[RFC PATCH 19/19] arm/gicv4: Add GICv4 to the build system

Mykyta Poturai posted 19 patches 5 months, 1 week ago
[RFC PATCH 19/19] arm/gicv4: Add GICv4 to the build system
Posted by Mykyta Poturai 5 months, 1 week ago
Add a config option to enable GICv4 support and include the
corresponding source file in the build system.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
---
 xen/arch/arm/Kconfig  | 6 ++++++
 xen/arch/arm/Makefile | 1 +
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 442d353b43..c18eca9f9a 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -255,6 +255,12 @@ config ARM64_BTI
 	  Branch Target Identification support.
 	  This feature is not supported in Xen.
 
+config GICV4
+	bool "GICv4 driver"
+	depends on GICV3 && HAS_ITS
+	help
+	  Driver for ARM Generic Interrupt Controller v4 extension.
+
 source "arch/arm/tee/Kconfig"
 
 config PARTIAL_EMULATION
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 95bc7ad25e..8569df571b 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -27,6 +27,7 @@ obj-y += gic.o
 obj-$(CONFIG_GICV2) += gic-v2.o
 obj-$(CONFIG_GICV3) += gic-v3.o
 obj-$(CONFIG_HAS_ITS) += gic-v3-its.o
+obj-$(CONFIG_GICV4) += gic-v4-its.o
 obj-$(CONFIG_HAS_ITS) += gic-v3-lpi.o
 obj-y += guestcopy.o
 obj-y += guest_atomics.o
-- 
2.51.2
Re: [RFC PATCH 19/19] arm/gicv4: Add GICv4 to the build system
Posted by Mykola Kvach 4 months, 3 weeks ago
On Mon, Feb 2, 2026 at 6:14 PM Mykyta Poturai <Mykyta_Poturai@epam.com> wrote:
>
> Add a config option to enable GICv4 support and include the
> corresponding source file in the build system.
>
> Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
> ---
>  xen/arch/arm/Kconfig  | 6 ++++++
>  xen/arch/arm/Makefile | 1 +
>  2 files changed, 7 insertions(+)
>
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index 442d353b43..c18eca9f9a 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -255,6 +255,12 @@ config ARM64_BTI
>           Branch Target Identification support.
>           This feature is not supported in Xen.
>
> +config GICV4
> +       bool "GICv4 driver"

nit: I would rename this to something more specific, e.g.:
    "GICv4 vLPI direct injection (experimental)",
as this is not a standalone GIC driver but v4 ITS extensions for direct
vLPI delivery.

It may also be worth gating it under "if UNSUPPORTED", since this builds
on the ITS code path which is currently marked as unsupported.

> +       depends on GICV3 && HAS_ITS
> +       help
> +         Driver for ARM Generic Interrupt Controller v4 extension.

Maybe expand the help text a bit, for example:

  Enable direct injection of vLPIs using the GICv4 ITS extensions.

  This adds support for vPE/vLPI management via ITS commands such as
  VMAPP, VMAPTI and (on vCPU migration) VMOVP, plus handling of per-vPE
  doorbell LPIs used by Xen to reschedule vCPUs when vLPIs are pending.

  Note: This relies on the (currently unsupported) ITS code path in Xen
  and is considered experimental.


Best regards,
Mykola

> +
>  source "arch/arm/tee/Kconfig"
>
>  config PARTIAL_EMULATION
> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
> index 95bc7ad25e..8569df571b 100644
> --- a/xen/arch/arm/Makefile
> +++ b/xen/arch/arm/Makefile
> @@ -27,6 +27,7 @@ obj-y += gic.o
>  obj-$(CONFIG_GICV2) += gic-v2.o
>  obj-$(CONFIG_GICV3) += gic-v3.o
>  obj-$(CONFIG_HAS_ITS) += gic-v3-its.o
> +obj-$(CONFIG_GICV4) += gic-v4-its.o
>  obj-$(CONFIG_HAS_ITS) += gic-v3-lpi.o
>  obj-y += guestcopy.o
>  obj-y += guest_atomics.o
> --
> 2.51.2