Lines Matching refs:xenpmu_data

21 	struct xen_pmu_data *xenpmu_data;  member
26 #define get_xenpmu_data() (this_cpu_ptr(&xenpmu_shared)->xenpmu_data)
205 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_pmu_emulate() local
209 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_intel_pmu_emulate()
212 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_pmu_emulate()
267 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_pmu_emulate() local
270 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_amd_pmu_emulate()
277 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_pmu_emulate()
354 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_read_pmc() local
357 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_amd_read_pmc()
365 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_read_pmc()
375 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_read_pmc() local
378 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_intel_read_pmc()
390 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_read_pmc()
411 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in pmu_apic_update() local
413 if (!xenpmu_data) { in pmu_apic_update()
418 xenpmu_data->pmu.l.lapic_lvtpc = val; in pmu_apic_update()
431 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_guest_state() local
434 if (!xenpmu_data) { in xen_guest_state()
439 if (!xen_initial_domain() || (xenpmu_data->domain_id >= DOMID_SELF)) in xen_guest_state()
444 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_PV) { in xen_guest_state()
445 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_USER) in xen_guest_state()
447 } else if (xenpmu_data->pmu.r.regs.cpl & 3) { in xen_guest_state()
456 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_get_guest_ip() local
458 if (!xenpmu_data) { in xen_get_guest_ip()
463 return xenpmu_data->pmu.r.regs.ip; in xen_get_guest_ip()
496 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_pmu_irq_handler() local
499 if (!xenpmu_data) { in xen_pmu_irq_handler()
506 xen_convert_regs(&xenpmu_data->pmu.r.regs, &regs, in xen_pmu_irq_handler()
507 xenpmu_data->pmu.pmu_flags); in xen_pmu_irq_handler()
529 struct xen_pmu_data *xenpmu_data; in xen_pmu_init() local
536 xenpmu_data = (struct xen_pmu_data *)get_zeroed_page(GFP_KERNEL); in xen_pmu_init()
537 if (!xenpmu_data) { in xen_pmu_init()
541 pfn = virt_to_pfn(xenpmu_data); in xen_pmu_init()
551 per_cpu(xenpmu_shared, cpu).xenpmu_data = xenpmu_data; in xen_pmu_init()
568 free_pages((unsigned long)xenpmu_data, 0); in xen_pmu_init()
584 free_pages((unsigned long)per_cpu(xenpmu_shared, cpu).xenpmu_data, 0); in xen_pmu_finish()
585 per_cpu(xenpmu_shared, cpu).xenpmu_data = NULL; in xen_pmu_finish()