]> git.baikalelectronics.ru Git - kernel.git/commit
arm/arm64: KVM: Clear map->active on pend/active clear
authorChristoffer Dall <christoffer.dall@linaro.org>
Sat, 17 Oct 2015 15:55:12 +0000 (17:55 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 20 Oct 2015 16:06:34 +0000 (18:06 +0200)
commit66cb1c29767d57805781394ed11b97f7a7ef3ad4
treeebeb8f44e77a1f0f0b375ca97fcae8902684cd6b
parent6380e286e336cd1c3e5fe1b468b75f467c15aaed
arm/arm64: KVM: Clear map->active on pend/active clear

When a guest reboots or offlines/onlines CPUs, it is not uncommon for it
to clear the pending and active states of an interrupt through the
emulated VGIC distributor.  However, since the architected timers are
defined by the architecture to be level triggered and the guest
rightfully expects them to be that, but we emulate them as
edge-triggered, we have to mimic level-triggered behavior for an
edge-triggered virtual implementation.

We currently do not signal the VGIC when the map->active field is true,
because it indicates that the guest has already been signalled of the
interrupt as required.  Normally this field is set to false when the
guest deactivates the virtual interrupt through the sync path.

We also need to catch the case where the guest deactivates the interrupt
through the emulated distributor, again allowing guests to boot even if
the original virtual timer signal hit before the guest's GIC
initialization sequence is run.

Reviewed-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c