[PATCH v4 2/2] KVM: arm/arm64: Route vtimer events to user space

Alexander Graf agraf at suse.de
Thu Sep 22 05:32:26 PDT 2016


On 09/20/2016 11:21 AM, Marc Zyngier wrote:
> On 19/09/16 18:39, Alexander Graf wrote:
>>
>> On 19.09.16 16:48, Marc Zyngier wrote:
>>
>>>> +
>>>> +		/*
>>>> +		 * So we can just explicitly mask or unmask the IRQ, gaining
>>>> +		 * more compatibility with oddball irq controllers.
>>>> +		 */
>>>> +		if (phys_active)
>>>> +			disable_percpu_irq(host_vtimer_irq);
>>>> +		else
>>>> +			enable_percpu_irq(host_vtimer_irq, 0);
>>> Since you are now targeting random irqchips (as opposed to a GIC
>>> specifically), what guarantees that the timer is a per-cpu IRQ?
>> This is the host interrupt controller - and we're already using percpu
>> irqs on it :). Also as it happens the RPi has them percpu (anything else
>> wouldn't make sense...).
> Not really. The RPi is faking percpu interrupts just to have some level
> of compatibility with the host arch timer driver. But nonetheless, if
> you're opening the code to something else than a GIC, then you should
> check that the interrupt you're getting is percpu.

This should already be covered by request_percpu_irq() in 
kvm_timer_hyp_init(), no?


Alex




More information about the linux-arm-kernel mailing list