]> xenbits.xensource.com Git - xen.git/commitdiff
ARM: VGIC: wire new VGIC(-v2) files into Xen build system
authorAndre Przywara <andre.przywara@linaro.org>
Thu, 24 Aug 2017 16:26:32 +0000 (17:26 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 29 Mar 2018 17:37:35 +0000 (10:37 -0700)
Now that we have both the old VGIC prepared to cope with a sibling and
the code for the new VGIC in place, lets add a Kconfig option to enable
the new code and wire it into the Xen build system.
This will add a compile time option to use either the "old" or the "new"
VGIC.
In the moment this is restricted to a vGIC-v2. To make the build system
happy, we provide a temporary dummy implementation of
vgic_v3_setup_hw() to allow building for now.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/Kconfig
xen/arch/arm/Makefile
xen/arch/arm/vgic/Makefile [new file with mode: 0644]
xen/arch/arm/vgic/vgic.c

index 2782ee6589d9b8473edb9f88c0996646ddb97c17..8174c0c635d0baf7c44112d58b3cac1eb8053410 100644 (file)
@@ -48,7 +48,23 @@ config HAS_GICV3
 config HAS_ITS
         bool
         prompt "GICv3 ITS MSI controller support" if EXPERT = "y"
-        depends on HAS_GICV3
+        depends on HAS_GICV3 && !NEW_VGIC
+
+config NEW_VGIC
+       bool
+       prompt "Use new VGIC implementation"
+       select NEEDS_LIST_SORT
+       ---help---
+
+       This is an alternative implementation of the ARM GIC interrupt
+       controller emulation, based on the Linux/KVM VGIC. It has a better
+       design and fixes many shortcomings of the existing GIC emulation in
+       Xen. It will eventually replace the existing/old VGIC.
+       However at the moment it lacks support for Dom0 using the ITS for
+       using MSIs.
+       Say Y if you want to help testing this new code or if you experience
+       problems with the standard emulation.
+       At the moment this implementation is not security supported.
 
 config SBSA_VUART_CONSOLE
        bool "Emulated SBSA UART console support"
index 41d73665272bfc6f729d9c736ff57a449d410537..a9533b107e991eff89dff9bdf753dca4fed7c80e 100644 (file)
@@ -16,7 +16,6 @@ obj-y += domain_build.o
 obj-y += domctl.o
 obj-$(EARLY_PRINTK) += early_printk.o
 obj-y += gic.o
-obj-y += gic-vgic.o
 obj-y += gic-v2.o
 obj-$(CONFIG_HAS_GICV3) += gic-v3.o
 obj-$(CONFIG_HAS_ITS) += gic-v3-its.o
@@ -47,10 +46,14 @@ obj-y += sysctl.o
 obj-y += time.o
 obj-y += traps.o
 obj-y += vcpreg.o
+subdir-$(CONFIG_NEW_VGIC) += vgic
+ifneq ($(CONFIG_NEW_VGIC),y)
+obj-y += gic-vgic.o
 obj-y += vgic.o
 obj-y += vgic-v2.o
 obj-$(CONFIG_HAS_GICV3) += vgic-v3.o
 obj-$(CONFIG_HAS_ITS) += vgic-v3-its.o
+endif
 obj-y += vm_event.o
 obj-y += vtimer.o
 obj-$(CONFIG_SBSA_VUART_CONSOLE) += vpl011.o
diff --git a/xen/arch/arm/vgic/Makefile b/xen/arch/arm/vgic/Makefile
new file mode 100644 (file)
index 0000000..8068269
--- /dev/null
@@ -0,0 +1,5 @@
+obj-y += vgic.o
+obj-y += vgic-v2.o
+obj-y += vgic-mmio.o
+obj-y += vgic-mmio-v2.o
+obj-y += vgic-init.o
index cf61cfe5efd55921d51a9554cdbc638a4b1affa3..a35449bf11c4a96e7177cbffdc5d49832debfe86 100644 (file)
@@ -974,6 +974,17 @@ unsigned int vgic_max_vcpus(const struct domain *d)
     return min_t(unsigned int, MAX_VIRT_CPUS, vgic_vcpu_limit);
 }
 
+#ifdef CONFIG_HAS_GICV3
+/* Dummy implementation to allow building without actual vGICv3 support. */
+void vgic_v3_setup_hw(paddr_t dbase,
+                      unsigned int nr_rdist_regions,
+                      const struct rdist_region *regions,
+                      unsigned int intid_bits)
+{
+    panic("New VGIC implementation does not yet support GICv3.");
+}
+#endif
+
 /*
  * Local variables:
  * mode: C