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

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional



Hi,

On 02/08/2023 14:53, Luca Fancellu wrote:
Introduce Kconfig GICV2 to be able to compile the GICv2 driver only
when needed, the option is active by default.

Introduce Kconfig VGICV2 that depends on GICV2 or GICV3 and compiles
the GICv2 emulation for guests, it is required only when using GICV2
driver, otherwise using GICV3 it is optional and can be deselected
if the user doesn't want to offer the vGICv2 interface to guests or
maybe its GICv3 hardware can't offer the GICv2 compatible mode.

Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
---
  xen/arch/arm/Kconfig        | 13 +++++++++++++
  xen/arch/arm/Makefile       |  4 ++--
  xen/arch/arm/domain_build.c |  4 ++++
  xen/arch/arm/gic-v3.c       |  4 ++++
  xen/arch/arm/vgic.c         |  2 ++
  5 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index fd57a82dd284..dc702f08ace7 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -78,6 +78,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
@@ -92,6 +100,11 @@ config HAS_ITS
          bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
          depends on GICV3 && !NEW_VGIC && !ARM_32
+config VGICV2
+       bool "vGICv2 interface for guests"

This description is a bit misleading as the vGICv2 will also be used for dom0 in the case of vGICv2.

+       default y

Please add a longer help.

+       depends on (GICV2 || GICV3) && !NEW_VGIC

In the near future, I don't expect anyone to introduce a new non-GIC of interrupt controller for Arm. But I would expect new version of the GIC. So I would drop (GICV2 || GICV3).

Also when !NEW_VGIC is selected, this will make VGICV2 will be unselected. I was actually expecting the other way around given that new vGIC only offer v2 support.

The rest of the changes LGTM.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.