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)
189 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_pmu_emulate() local
193 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_intel_pmu_emulate()
196 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_pmu_emulate()
251 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_pmu_emulate() local
254 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_amd_pmu_emulate()
261 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_pmu_emulate()
334 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_read_pmc() local
337 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_amd_read_pmc()
345 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_read_pmc()
355 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_read_pmc() local
358 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_intel_read_pmc()
370 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_read_pmc()
391 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in pmu_apic_update() local
393 if (!xenpmu_data) { in pmu_apic_update()
398 xenpmu_data->pmu.l.lapic_lvtpc = val; in pmu_apic_update()
411 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_is_in_guest() local
413 if (!xenpmu_data) { in xen_is_in_guest()
418 if (!xen_initial_domain() || (xenpmu_data->domain_id >= DOMID_SELF)) in xen_is_in_guest()
426 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_is_user_mode() local
428 if (!xenpmu_data) { in xen_is_user_mode()
433 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_PV) in xen_is_user_mode()
434 return (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_USER); in xen_is_user_mode()
436 return !!(xenpmu_data->pmu.r.regs.cpl & 3); in xen_is_user_mode()
441 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_get_guest_ip() local
443 if (!xenpmu_data) { in xen_get_guest_ip()
448 return xenpmu_data->pmu.r.regs.ip; in xen_get_guest_ip()
482 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_pmu_irq_handler() local
485 if (!xenpmu_data) { in xen_pmu_irq_handler()
492 xen_convert_regs(&xenpmu_data->pmu.r.regs, ®s, in xen_pmu_irq_handler()
493 xenpmu_data->pmu.pmu_flags); in xen_pmu_irq_handler()
518 struct xen_pmu_data *xenpmu_data; in xen_pmu_init() local
525 xenpmu_data = (struct xen_pmu_data *)get_zeroed_page(GFP_KERNEL); in xen_pmu_init()
526 if (!xenpmu_data) { in xen_pmu_init()
530 pfn = virt_to_pfn(xenpmu_data); in xen_pmu_init()
540 per_cpu(xenpmu_shared, cpu).xenpmu_data = xenpmu_data; in xen_pmu_init()
556 free_pages((unsigned long)xenpmu_data, 0); in xen_pmu_init()
572 free_pages((unsigned long)per_cpu(xenpmu_shared, cpu).xenpmu_data, 0); in xen_pmu_finish()
573 per_cpu(xenpmu_shared, cpu).xenpmu_data = NULL; in xen_pmu_finish()