]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm: vgic: Synchronize the whole guest on GIC{D,R}_I{S,C}ACTIVER read
authorMarc Zyngier <maz@kernel.org>
Mon, 6 Apr 2020 15:21:20 +0000 (16:21 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 22 Apr 2020 16:13:16 +0000 (17:13 +0100)
commitb5a38606ebe787281b5787c1a55e85392d39b7d2
tree9b17d206d5214da49e312fcdb325d9501429ef8c
parent1610779b8f85ee8e032dd52e1cdd11418a2b8dde
KVM: arm: vgic: Synchronize the whole guest on GIC{D,R}_I{S,C}ACTIVER read

When a guest tries to read the active state of its interrupts,
we currently just return whatever state we have in memory. This
means that if such an interrupt lives in a List Register on another
CPU, we fail to obsertve the latest active state for this interrupt.

In order to remedy this, stop all the other vcpus so that they exit
and we can observe the most recent value for the state. This is
similar to what we are doing for the write side of the same
registers, and results in new MMIO handlers for userspace (which
do not need to stop the guest, as it is supposed to be stopped
already).

Reported-by: Julien Grall <julien@xen.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
virt/kvm/arm/vgic/vgic-mmio-v2.c
virt/kvm/arm/vgic/vgic-mmio-v3.c
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-mmio.h