aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2015-03-26 10:39:34 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2015-03-26 17:43:14 -0400
commit6777f77f0f544f686ee3158ff0db6a7d81b7d3a2 (patch)
tree6000815254750f2d1f85d3308ffee420af9844a9 /include/kvm
parent9f199d0a0eeb8efb564ff41a6b9f819c4c0285ea (diff)
KVM: arm/arm64: implement kvm_io_bus MMIO handling for the VGIC
Currently we use a lot of VGIC specific code to do the MMIO dispatching. Use the previous reworks to add kvm_io_bus style MMIO handlers. Those are not yet called by the MMIO abort handler, also the actual VGIC emulator function do not make use of it yet, but will be enabled with the following patches. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_vgic.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 9092fad3c141..f90140caed8f 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -24,6 +24,7 @@
24#include <linux/irqreturn.h> 24#include <linux/irqreturn.h>
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <linux/types.h> 26#include <linux/types.h>
27#include <kvm/iodev.h>
27 28
28#define VGIC_NR_IRQS_LEGACY 256 29#define VGIC_NR_IRQS_LEGACY 256
29#define VGIC_NR_SGIS 16 30#define VGIC_NR_SGIS 16
@@ -147,6 +148,14 @@ struct vgic_vm_ops {
147 int (*map_resources)(struct kvm *, const struct vgic_params *); 148 int (*map_resources)(struct kvm *, const struct vgic_params *);
148}; 149};
149 150
151struct vgic_io_device {
152 gpa_t addr;
153 int len;
154 const struct vgic_io_range *reg_ranges;
155 struct kvm_vcpu *redist_vcpu;
156 struct kvm_io_device dev;
157};
158
150struct vgic_dist { 159struct vgic_dist {
151 spinlock_t lock; 160 spinlock_t lock;
152 bool in_kernel; 161 bool in_kernel;