lkml.org 
[lkml]   [2015]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH v5 3/6] xen/PMU: Initialization code for Xen PMU
On 07/02/2015 12:21 PM, David Vrabel wrote:
> On 02/07/15 15:53, Boris Ostrovsky wrote:
>> Map shared data structure that will hold CPU registers, VPMU context,
>> V/PCPU IDs of the CPU interrupted by PMU interrupt. Hypervisor fills
>> this information in its handler and passes it to the guest for further
>> processing.
>>
>> Set up PMU VIRQ.
>>
>> Now that perf infrastructure will assume that PMU is available on a PV
>> guest we need to be careful and make sure that accesses via RDPMC
>> instruction don't cause fatal traps by the hypervisor. Provide a nop
>> RDPMC handler.
>>
>> For the same reason avoid issuing a warning on a write to APIC's LVTPC.
>>
>> Both of these will be made functional in later patches.
> [...]
>> + rc = bind_virq_to_irqhandler(VIRQ_XENPMU, cpu,
>> + xen_pmu_irq_handler,
>> + IRQF_PERCPU|IRQF_NOBALANCING,
>> + pmu_name, NULL);
> If you bind a VIRQ as IRQF_PERCPU it can only be safely unbound on the
> CPU it is bound to (because the percpu handler does not take the
> desc->lock).

This is a true per-cpu VIRQ and we only unbind it on cpu_die() path so I
think IRQF_PERCPU should be safe, no? (it behaves similar to VIRQ_TIMER
in how/when it is unbound).

-boris

>
> Otherwise, Reviewed-by: David Vrabel <david.vrabel@citrix.com>
>
> David



\
 
 \ /
  Last update: 2015-07-02 19:41    [W:0.043 / U:3.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site