WSL2-Linux-Kernel/virt/kvm/arm/hyp
Marc Zyngier 27e91ad1e7 kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3
On guest exit, and when using GICv2 on GICv3, we use a dsb(st) to
force synchronization between the memory-mapped guest view and
the system-register view that the hypervisor uses.

This is incorrect, as the spec calls out the need for "a DSB whose
required access type is both loads and stores with any Shareability
attribute", while we're only synchronizing stores.

We also lack an isb after the dsb to ensure that the latter has
actually been executed before we start reading stuff from the sysregs.

The fix is pretty easy: turn dsb(st) into dsb(sy), and slap an isb()
just after.

Cc: stable@vger.kernel.org
Fixes: f68d2b1b73 ("arm64: KVM: Implement vgic-v3 save/restore")
Acked-by: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-03-14 18:31:26 +00:00
..
timer-sr.c KVM: arm/arm64: Don't enable/disable physical timer access on VHE 2017-11-29 16:46:09 +01:00
vgic-v2-sr.c KVM: arm/arm64: Detangle kvm_mmu.h from kvm_hyp.h 2018-01-08 15:20:43 +01:00
vgic-v3-sr.c kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3 2018-03-14 18:31:26 +00:00