@@ -80,6 +80,14 @@ config ARM_EFI
UEFI firmware. A UEFI stub is provided to allow Xen to
be booted as an EFI application.
+config GICV2
+ bool "GICv2 driver"
+ default y
+ select VGICV2
+ help
+ Driver for the ARM Generic Interrupt Controller v2.
+ If unsure, say Y
+
config GICV3
bool "GICv3 driver"
depends on !NEW_VGIC
@@ -99,11 +107,22 @@ config OVERLAY_DTB
help
Dynamic addition/removal of Xen device tree nodes using a dtbo.
+config VGICV2
+ bool "vGICv2 interface for domains"
+ default y
+ help
+ Allow Xen to expose a Generic Interrupt Controller version 2 like to Xen
+ domains. This can be configured at the domain creation.
+ This option is mandatory when using GICv2.
+ For GICv3, this allows domain to use GICv2 when the hardware supports it.
+ If unsure say Y.
+
config HVM
def_bool y
config NEW_VGIC
bool "Use new VGIC implementation"
+ select GICV2
---help---
This is an alternative implementation of the ARM GIC interrupt
@@ -22,7 +22,7 @@ obj-y += domctl.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-y += efi/
obj-y += gic.o
-obj-y += gic-v2.o
+obj-$(CONFIG_GICV2) += gic-v2.o
obj-$(CONFIG_GICV3) += gic-v3.o
obj-$(CONFIG_HAS_ITS) += gic-v3-its.o
obj-$(CONFIG_HAS_ITS) += gic-v3-lpi.o
@@ -57,7 +57,7 @@ obj-$(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_VGICV2) += vgic-v2.o
obj-$(CONFIG_GICV3) += vgic-v3.o
obj-$(CONFIG_HAS_ITS) += vgic-v3-its.o
endif
@@ -2490,6 +2490,7 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
return res;
}
+#ifdef CONFIG_VGICV2
static int __init make_gicv2_domU_node(struct kernel_info *kinfo)
{
void *fdt = kinfo->fdt;
@@ -2541,6 +2542,7 @@ static int __init make_gicv2_domU_node(struct kernel_info *kinfo)
return res;
}
+#endif
#ifdef CONFIG_GICV3
static int __init make_gicv3_domU_node(struct kernel_info *kinfo)
@@ -2616,8 +2618,10 @@ static int __init make_gic_domU_node(struct kernel_info *kinfo)
case GIC_V3:
return make_gicv3_domU_node(kinfo);
#endif
+#ifdef CONFIG_VGICV2
case GIC_V2:
return make_gicv2_domU_node(kinfo);
+#endif
default:
panic("Unsupported GIC version\n");
}
@@ -1334,6 +1334,7 @@ static paddr_t __initdata dbase = INVALID_PADDR;
static paddr_t __initdata vbase = INVALID_PADDR, vsize = 0;
static paddr_t __initdata cbase = INVALID_PADDR, csize = 0;
+#ifdef CONFIG_VGICV2
/* If the GICv3 supports GICv2, initialize it */
static void __init gicv3_init_v2(void)
{
@@ -1359,6 +1360,9 @@ static void __init gicv3_init_v2(void)
vgic_v2_setup_hw(dbase, cbase, csize, vbase, 0);
}
+#else
+static inline void gicv3_init_v2(void) { }
+#endif
static void __init gicv3_ioremap_distributor(paddr_t dist_paddr)
{
@@ -96,10 +96,12 @@ int domain_vgic_register(struct domain *d, unsigned int *mmio_count)
return -ENODEV;
break;
#endif
+#ifdef CONFIG_VGICV2
case GIC_V2:
if ( vgic_v2_init(d, mmio_count) )
return -ENODEV;
break;
+#endif
default:
printk(XENLOG_G_ERR "d%d: Unknown vGIC version %u\n",
d->domain_id, d->arch.vgic.version);
@@ -1,5 +1,5 @@
obj-y += vgic.o
-obj-y += vgic-v2.o
+obj-$(CONFIG_VGICV2) += vgic-v2.o
obj-y += vgic-mmio.o
-obj-y += vgic-mmio-v2.o
+obj-$(CONFIG_VGICV2) += vgic-mmio-v2.o
obj-y += vgic-init.o