[PATCH v3 19/55] KVM: arm/arm64: vgic-new: Add GICv3 world switch backend

Peter Maydell peter.maydell at linaro.org
Tue May 10 07:15:12 PDT 2016

On 10 May 2016 at 15:04, Christoffer Dall <christoffer.dall at linaro.org> wrote:
> On Fri, May 06, 2016 at 11:45:32AM +0100, Andre Przywara wrote:
>> +     /*
>> +      * Currently all guest IRQs are Group1, as Group0 would result
>> +      * in a FIQ in the guest, which it wouldn't expect.
> I still don't like or understand this comment.  This should simply say
> that we're making a gross assumption about all interrupts being group1
> here.

It's not really an assumption so much as it's a missing feature (aka bug):
there's no reason the vGIC shouldn't support group 0 interrupts. We
just get away with only supporting group 1 because Linux guests
happen to only use group 1 interrupts. If/when the vGIC gains support
for group0 interrupts, then it should reset with interrupts configured
in group0 by default.

>> +      * Eventually we want to make this configurable, so we may
>> +      * revisit this in the future.
>> +      */

The only reason to make it configurable is to work around a guest
kernel bug whereby Linux assumes that all interrupts start out
in Group1. Marc sent out a patch earlier today that fixes that bug:
Depending on how long it takes you to fix this missing vgic feature,
such kernels may all be long-forgotten, in which case you can
get away without the config option :-)

-- PMM

More information about the linux-arm-kernel mailing list