diff mbox

[09/11] kvmtool: add required GICv3 defines also to ARM

Message ID 1422030910-17881-10-git-send-email-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andre Przywara Jan. 23, 2015, 4:35 p.m. UTC
The virtual GICv3 support in the kernel is currently for ARM64 only,
so the ARM uapi headers lack the defines for the GICv3 KVM device
function IDs.
However this will break compilation for ARM with GICv3 support later,
as the GIC code in kvmtool is shared between ARM and ARM64.
Splitting this deliberately makes no sense, also #ifdef-ing GICv3
specific code is messy and serves no purpose other than work
around the missing definitions. Since GICv3 emulation may be extended
to ARM in the future, let's fix compilation for ARM by providing the
two required #define's in a kvmtool local header for the time being.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 tools/kvm/arm/aarch32/include/kvm/kvm-arch.h |    8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h b/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h
index 1632e3c..11dc9a6 100644
--- a/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h
+++ b/tools/kvm/arm/aarch32/include/kvm/kvm-arch.h
@@ -8,6 +8,14 @@ 
 
 #define ARM_MAX_MEMORY(...)	ARM_LOMAP_MAX_MEMORY
 
+/*
+ * This is here for the time being until KVM/ARM gets virtual GICv3
+ * emulation also. The uapi headers provide that definition only
+ * for ARM64.
+ */
+#define KVM_VGIC_V3_ADDR_TYPE_DIST	2
+#define KVM_VGIC_V3_ADDR_TYPE_REDIST	3
+
 #include "arm-common/kvm-arch.h"
 
 #endif /* KVM__KVM_ARCH_H */