Lines Matching refs:xenpmu_data

20 	struct xen_pmu_data *xenpmu_data;  member
25 #define get_xenpmu_data() (this_cpu_ptr(&xenpmu_shared)->xenpmu_data)
204 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_pmu_emulate() local
208 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_intel_pmu_emulate()
211 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_pmu_emulate()
266 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_pmu_emulate() local
269 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_amd_pmu_emulate()
276 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_pmu_emulate()
353 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_read_pmc() local
356 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_amd_read_pmc()
364 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_read_pmc()
374 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_read_pmc() local
377 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_intel_read_pmc()
389 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_read_pmc()
410 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in pmu_apic_update() local
412 if (!xenpmu_data) { in pmu_apic_update()
417 xenpmu_data->pmu.l.lapic_lvtpc = val; in pmu_apic_update()
430 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_guest_state() local
433 if (!xenpmu_data) { in xen_guest_state()
438 if (!xen_initial_domain() || (xenpmu_data->domain_id >= DOMID_SELF)) in xen_guest_state()
443 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_PV) { in xen_guest_state()
444 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_USER) in xen_guest_state()
446 } else if (xenpmu_data->pmu.r.regs.cpl & 3) { in xen_guest_state()
455 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_get_guest_ip() local
457 if (!xenpmu_data) { in xen_get_guest_ip()
462 return xenpmu_data->pmu.r.regs.ip; in xen_get_guest_ip()
495 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_pmu_irq_handler() local
498 if (!xenpmu_data) { in xen_pmu_irq_handler()
505 xen_convert_regs(&xenpmu_data->pmu.r.regs, &regs, in xen_pmu_irq_handler()
506 xenpmu_data->pmu.pmu_flags); in xen_pmu_irq_handler()
528 struct xen_pmu_data *xenpmu_data; in xen_pmu_init() local
535 xenpmu_data = (struct xen_pmu_data *)get_zeroed_page(GFP_KERNEL); in xen_pmu_init()
536 if (!xenpmu_data) { in xen_pmu_init()
540 pfn = virt_to_pfn(xenpmu_data); in xen_pmu_init()
550 per_cpu(xenpmu_shared, cpu).xenpmu_data = xenpmu_data; in xen_pmu_init()
567 free_pages((unsigned long)xenpmu_data, 0); in xen_pmu_init()
583 free_pages((unsigned long)per_cpu(xenpmu_shared, cpu).xenpmu_data, 0); in xen_pmu_finish()
584 per_cpu(xenpmu_shared, cpu).xenpmu_data = NULL; in xen_pmu_finish()