aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/virt/kvm/arm/vgic/vgic-mmio.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-05-09 12:51:49 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-05-09 12:51:49 +0200
commit36c344f3f1ffc0b1b20abd237b7401dc6687ee8f (patch)
tree24b330a2e62bfc8f576cccdc833b53e1f1b69050 /virt/kvm/arm/vgic/vgic-mmio.h
parentnVMX: Advertise PML to L1 hypervisor (diff)
parentKVM: arm/arm64: vgic-its: Cleanup after failed ITT restore (diff)
downloadwireguard-linux-36c344f3f1ffc0b1b20abd237b7401dc6687ee8f.tar.xz
wireguard-linux-36c344f3f1ffc0b1b20abd237b7401dc6687ee8f.zip
Merge tag 'kvm-arm-for-v4.12-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
Second round of KVM/ARM Changes for v4.12. Changes include: - A fix related to the 32-bit idmap stub - A fix to the bitmask used to deode the operands of an AArch32 CP instruction - We have moved the files shared between arch/arm/kvm and arch/arm64/kvm to virt/kvm/arm - We add support for saving/restoring the virtual ITS state to userspace
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-mmio.h')
-rw-r--r--virt/kvm/arm/vgic/vgic-mmio.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-mmio.h b/virt/kvm/arm/vgic/vgic-mmio.h
index 98bb566b660a..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;
@@ -192,4 +197,9 @@ u64 vgic_sanitise_shareability(u64 reg);
u64 vgic_sanitise_field(u64 reg, u64 field_mask, int field_shift,
u64 (*sanitise_fn)(u64));
+/* Find the proper register handler entry given a certain address offset */
+const struct vgic_register_region *
+vgic_find_mmio_region(const struct vgic_register_region *regions,
+ int nr_regions, unsigned int offset);
+
#endif