aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic.h
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2015-03-26 14:39:34 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2015-03-26 21:43:14 +0000
commit6777f77f0f544f686ee3158ff0db6a7d81b7d3a2 (patch)
tree6000815254750f2d1f85d3308ffee420af9844a9 /virt/kvm/arm/vgic.h
parentKVM: arm/arm64: simplify vgic_find_range() and callers (diff)
downloadlinux-dev-6777f77f0f544f686ee3158ff0db6a7d81b7d3a2.tar.xz
linux-dev-6777f77f0f544f686ee3158ff0db6a7d81b7d3a2.zip
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 'virt/kvm/arm/vgic.h')
-rw-r--r--virt/kvm/arm/vgic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic.h b/virt/kvm/arm/vgic.h
index 01aa6228f88b..28fa3aaf6367 100644
--- a/virt/kvm/arm/vgic.h
+++ b/virt/kvm/arm/vgic.h
@@ -20,6 +20,8 @@
#ifndef __KVM_VGIC_H__
#define __KVM_VGIC_H__
+#include <kvm/iodev.h>
+
#define VGIC_ADDR_UNDEF (-1)
#define IS_VGIC_ADDR_UNDEF(_x) ((_x) == VGIC_ADDR_UNDEF)
@@ -82,6 +84,11 @@ struct vgic_io_range {
phys_addr_t offset);
};
+int vgic_register_kvm_io_dev(struct kvm *kvm, gpa_t base, int len,
+ const struct vgic_io_range *ranges,
+ int redist_id,
+ struct vgic_io_device *iodev);
+
static inline bool is_in_range(phys_addr_t addr, unsigned long len,
phys_addr_t baseaddr, unsigned long size)
{