KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI
authorMarc Zyngier <maz@kernel.org>
Wed, 28 Aug 2019 10:10:16 +0000 (11:10 +0100)
committerWill Deacon <will@kernel.org>
Wed, 28 Aug 2019 10:21:42 +0000 (11:21 +0100)
commit82e40f558de566fdee214bec68096bbd5e64a6a4
treeaf1de026d68fd0011ed5a476649ea827fe8d3c76
parentd4a8061a7c5f7c27a2dc002ee4cb89b3e6637e44
KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI

A guest is not allowed to inject a SGI (or clear its pending state)
by writing to GICD_ISPENDR0 (resp. GICD_ICPENDR0), as these bits are
defined as WI (as per ARM IHI 0048B 4.3.7 and 4.3.8).

Make sure we correctly emulate the architecture.

Fixes: 96b298000db4 ("KVM: arm/arm64: vgic-new: Add PENDING registers handlers")
Cc: stable@vger.kernel.org # 4.7+
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-v2.c
virt/kvm/arm/vgic/vgic-v3.c