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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 tools/kvm/arm/aarch32/include/kvm/kvm-arch.h |    8 ++++++++
 1 file changed, 8 insertions(+)

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 */
-- 
1.7.9.5

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux