diff options
author | Marc Zyngier <maz@kernel.org> | 2020-04-09 13:05:26 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-04-22 17:13:30 +0100 |
commit | 41ee52ecbcdc98eb2a03241923b1a7d46f476bb3 (patch) | |
tree | a82fefae445268e338524b3188192d0bab8cc2c0 /virt/kvm/arm/vgic/vgic-mmio.h | |
parent | 9a50ebbffa9862db7604345f5fd763122b0f6fed (diff) | |
download | linux-41ee52ecbcdc98eb2a03241923b1a7d46f476bb3.tar.bz2 |
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>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-mmio.h')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-mmio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic-mmio.h b/virt/kvm/arm/vgic/vgic-mmio.h index 30713a44e3fa..327d0a6938e4 100644 --- a/virt/kvm/arm/vgic/vgic-mmio.h +++ b/virt/kvm/arm/vgic/vgic-mmio.h @@ -138,6 +138,14 @@ void vgic_mmio_write_cenable(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val); +int vgic_uaccess_write_senable(struct kvm_vcpu *vcpu, + gpa_t addr, unsigned int len, + unsigned long val); + +int vgic_uaccess_write_cenable(struct kvm_vcpu *vcpu, + gpa_t addr, unsigned int len, + unsigned long val); + unsigned long vgic_mmio_read_pending(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len); |