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)
196 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_pmu_emulate() local
200 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_intel_pmu_emulate()
203 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_pmu_emulate()
258 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_pmu_emulate() local
261 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) in xen_amd_pmu_emulate()
268 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_pmu_emulate()
341 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_amd_read_pmc() local
344 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_amd_read_pmc()
352 ctxt = &xenpmu_data->pmu.c.amd; in xen_amd_read_pmc()
362 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_intel_read_pmc() local
365 if (!xenpmu_data || !(xenpmu_flags & XENPMU_IRQ_PROCESSING)) { in xen_intel_read_pmc()
377 ctxt = &xenpmu_data->pmu.c.intel; in xen_intel_read_pmc()
398 struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in pmu_apic_update() local
400 if (!xenpmu_data) { in pmu_apic_update()
405 xenpmu_data->pmu.l.lapic_lvtpc = val; in pmu_apic_update()
418 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_is_in_guest() local
420 if (!xenpmu_data) { in xen_is_in_guest()
425 if (!xen_initial_domain() || (xenpmu_data->domain_id >= DOMID_SELF)) in xen_is_in_guest()
433 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_is_user_mode() local
435 if (!xenpmu_data) { in xen_is_user_mode()
440 if (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_PV) in xen_is_user_mode()
441 return (xenpmu_data->pmu.pmu_flags & PMU_SAMPLE_USER); in xen_is_user_mode()
443 return !!(xenpmu_data->pmu.r.regs.cpl & 3); in xen_is_user_mode()
448 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_get_guest_ip() local
450 if (!xenpmu_data) { in xen_get_guest_ip()
455 return xenpmu_data->pmu.r.regs.ip; in xen_get_guest_ip()
489 const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); in xen_pmu_irq_handler() local
492 if (!xenpmu_data) { in xen_pmu_irq_handler()
499 xen_convert_regs(&xenpmu_data->pmu.r.regs, ®s, in xen_pmu_irq_handler()
500 xenpmu_data->pmu.pmu_flags); in xen_pmu_irq_handler()
525 struct xen_pmu_data *xenpmu_data; in xen_pmu_init() local
532 xenpmu_data = (struct xen_pmu_data *)get_zeroed_page(GFP_KERNEL); in xen_pmu_init()
533 if (!xenpmu_data) { in xen_pmu_init()
537 pfn = virt_to_pfn(xenpmu_data); in xen_pmu_init()
547 per_cpu(xenpmu_shared, cpu).xenpmu_data = xenpmu_data; in xen_pmu_init()
563 free_pages((unsigned long)xenpmu_data, 0); in xen_pmu_init()
579 free_pages((unsigned long)per_cpu(xenpmu_shared, cpu).xenpmu_data, 0); in xen_pmu_finish()
580 per_cpu(xenpmu_shared, cpu).xenpmu_data = NULL; in xen_pmu_finish()