aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-07-15 07:43:30 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2016-07-18 13:14:35 -0400
commit59c5ab40989afa5aba9c4a0918a5ed910a917422 (patch)
tree42cf5f34ab95494f0993bbcbb39c88e36f61fda5 /include/kvm
parent0aa1de57319c4e023187aca0d59dd593a96459a8 (diff)
KVM: arm64: vgic-its: Introduce ITS emulation file with MMIO framework
The ARM GICv3 ITS emulation code goes into a separate file, but needs to be connected to the GICv3 emulation, of which it is an option. The ITS MMIO handlers require the respective ITS pointer to be passed in, so we amend the existing VGIC MMIO framework to let it cope with that. Also we introduce the basic ITS data structure and initialize it, but don't return any success yet, as we are not yet ready for the show. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_vgic.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index df2dec5ef620..685f33975ce4 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -108,15 +108,35 @@ struct vgic_irq {
108}; 108};
109 109
110struct vgic_register_region; 110struct vgic_register_region;
111struct vgic_its;
112
113enum iodev_type {
114 IODEV_CPUIF,
115 IODEV_DIST,
116 IODEV_REDIST,
117 IODEV_ITS
118};
111 119
112struct vgic_io_device { 120struct vgic_io_device {
113 gpa_t base_addr; 121 gpa_t base_addr;
114 struct kvm_vcpu *redist_vcpu; 122 union {
123 struct kvm_vcpu *redist_vcpu;
124 struct vgic_its *its;
125 };
115 const struct vgic_register_region *regions; 126 const struct vgic_register_region *regions;
127 enum iodev_type iodev_type;
116 int nr_regions; 128 int nr_regions;
117 struct kvm_io_device dev; 129 struct kvm_io_device dev;
118}; 130};
119 131
132struct vgic_its {
133 /* The base address of the ITS control register frame */
134 gpa_t vgic_its_base;
135
136 bool enabled;
137 struct vgic_io_device iodev;
138};
139
120struct vgic_dist { 140struct vgic_dist {
121 bool in_kernel; 141 bool in_kernel;
122 bool ready; 142 bool ready;