diff options
author | Eric Auger <eric.auger@redhat.com> | 2016-12-20 09:33:13 +0100 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-05-08 14:33:54 +0200 |
commit | 8331c23c28e8b7f70cb5c25366160d900ab127d7 (patch) | |
tree | 0dea6ac70c5db28748e2334b42716b3286a1b2c1 /virt/kvm/arm/vgic/vgic-mmio.h | |
parent | KVM: arm/arm64: vgic: expose (un)lock_all_vcpus (diff) | |
download | linux-8331c23c28e8b7f70cb5c25366160d900ab127d7.tar.xz linux-8331c23c28e8b7f70cb5c25366160d900ab127d7.zip |
KVM: arm64: vgic-its: Implement vgic_its_has_attr_regs and attr_regs_access
This patch implements vgic_its_has_attr_regs and vgic_its_attr_regs_access
upon the MMIO framework. VGIC ITS KVM device KVM_DEV_ARM_VGIC_GRP_ITS_REGS
group becomes functional.
At least GITS_CREADR and GITS_IIDR require to differentiate a guest write
action from a user access. As such let's introduce a new uaccess_its_write
vgic_register_region callback.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-mmio.h')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-mmio.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-mmio.h b/virt/kvm/arm/vgic/vgic-mmio.h index 6eec91bb1657..ea4171acdef3 100644 --- a/virt/kvm/arm/vgic/vgic-mmio.h +++ b/virt/kvm/arm/vgic/vgic-mmio.h @@ -36,8 +36,13 @@ struct vgic_register_region { }; unsigned long (*uaccess_read)(struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len); - void (*uaccess_write)(struct kvm_vcpu *vcpu, gpa_t addr, - unsigned int len, unsigned long val); + union { + void (*uaccess_write)(struct kvm_vcpu *vcpu, gpa_t addr, + unsigned int len, unsigned long val); + int (*uaccess_its_write)(struct kvm *kvm, struct vgic_its *its, + gpa_t addr, unsigned int len, + unsigned long val); + }; }; extern struct kvm_io_device_ops kvm_io_gic_ops; |