KVM: arm: vgic: Only use the virtual state when userspace accesses enable bits
authorMarc Zyngier <maz@kernel.org>
Thu, 9 Apr 2020 12:05:26 +0000 (13:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 22 Apr 2020 16:13:30 +0000 (17:13 +0100)
commit41ee52ecbcdc98eb2a03241923b1a7d46f476bb3
treea82fefae445268e338524b3188192d0bab8cc2c0
parent9a50ebbffa9862db7604345f5fd763122b0f6fed
KVM: arm: vgic: Only use the virtual state when userspace accesses enable bits

There is no point in accessing the HW when writing to any of the
ISENABLER/ICENABLER 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.

Reported-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
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-v3.c
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-mmio.h