summaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_vgic.h
diff options
context:
space:
mode:
authorAndre Przywara2016-07-15 13:43:30 +0200
committerMarc Zyngier2016-07-18 19:14:35 +0200
commit59c5ab40989afa5aba9c4a0918a5ed910a917422 (patch)
tree42cf5f34ab95494f0993bbcbb39c88e36f61fda5 /include/kvm/arm_vgic.h
parentKVM: arm64: vgic: Handle ITS related GICv3 redistributor registers (diff)
downloadkernel-qcow2-linux-59c5ab40989afa5aba9c4a0918a5ed910a917422.tar.gz
kernel-qcow2-linux-59c5ab40989afa5aba9c4a0918a5ed910a917422.tar.xz
kernel-qcow2-linux-59c5ab40989afa5aba9c4a0918a5ed910a917422.zip
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/arm_vgic.h')
-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 {
};
struct vgic_register_region;
+struct vgic_its;
+
+enum iodev_type {
+ IODEV_CPUIF,
+ IODEV_DIST,
+ IODEV_REDIST,
+ IODEV_ITS
+};
struct vgic_io_device {
gpa_t base_addr;
- struct kvm_vcpu *redist_vcpu;
+ union {
+ struct kvm_vcpu *redist_vcpu;
+ struct vgic_its *its;
+ };
const struct vgic_register_region *regions;
+ enum iodev_type iodev_type;
int nr_regions;
struct kvm_io_device dev;
};
+struct vgic_its {
+ /* The base address of the ITS control register frame */
+ gpa_t vgic_its_base;
+
+ bool enabled;
+ struct vgic_io_device iodev;
+};
+
struct vgic_dist {
bool in_kernel;
bool ready;