KVM: arm/arm64: arch_timer: Preserve physical dist. active state on LR.active
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 24 Nov 2015 15:23:05 +0000 (16:23 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 24 Nov 2015 17:07:40 +0000 (18:07 +0100)
commit0e3dfda91d9fe8e2c4d0b5d21434b173a241eeaf
tree0f976f6b44f4ded62834c26579d9265406531a8f
parent7e16aa81f9f6a7cfe2287b788a7d62abc2880185
KVM: arm/arm64: arch_timer: Preserve physical dist. active state on LR.active

We were incorrectly removing the active state from the physical
distributor on the timer interrupt when the timer output level was
deasserted.  We shouldn't be doing this without considering the virtual
interrupt's active state, because the architecture requires that when an
LR has the HW bit set and the pending or active bits set, then the
physical interrupt must also have the corresponding bits set.

This addresses an issue where we have been observing an inconsistency
between the LR state and the physical distributor state where the LR
state was active and the physical distributor was not active, which
shouldn't happen.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
include/kvm/arm_vgic.h
virt/kvm/arm/arch_timer.c
virt/kvm/arm/vgic.c