]> 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)
commite8f75eaceeb12e179fa205f7fb61824376fe442b
tree9b17d206d5214da49e312fcdb325d9501429ef8c
parentbddb5939bd0dd28aa7fdde3686201f0ca2cf622e
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