]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm: vgic-v2: Only use the virtual state when userspace accesses pending bits
authorMarc Zyngier <maz@kernel.org>
Thu, 9 Apr 2020 12:05:26 +0000 (13:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 23 Apr 2020 15:26:31 +0000 (16:26 +0100)
commit92284aa5f57cec8b62f83c161096c34e6943b354
treea0f2162a4222f19fbea3d2104042aa8910190aa7
parent90926ed92c797b4ccd2c91c5ec4a36416dc23e82
KVM: arm: vgic-v2: Only use the virtual state when userspace accesses pending bits

There is no point in accessing the HW when writing to any of the
ISPENDR/ICPENDR registers from userspace, as only the guest should
be allowed to change the HW state.

Introduce new userspace-specific accessors that deal solely with
the virtual state. Note that the API differs from that of GICv3,
where userspace exclusively uses ISPENDR to set the state. Too
bad we can't reuse it.

Fixes: d8ebad7065b1f ("KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI")
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
virt/kvm/arm/vgic/vgic-mmio-v2.c
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-mmio.h