[PATCH 64/65] hw/arm/virt: Enable GICv5 CPU interface when using GICv5

Peter Maydell posted 65 patches 1 month, 2 weeks ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH 64/65] hw/arm/virt: Enable GICv5 CPU interface when using GICv5
Posted by Peter Maydell 1 month, 2 weeks ago
If we are using the GICv5 in the virt board, we need to set the
has_gcie property on the CPU objects to tell them to implement the
cpu interface part of GICv5.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/virt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 1b63338196..1c684b59b4 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2677,6 +2677,14 @@ static void machvirt_init(MachineState *machine)
             object_property_set_bool(cpuobj, "lpa2", false, NULL);
         }
 
+        if (vms->gic_version == VIRT_GIC_VERSION_5) {
+            if (!object_property_find(cpuobj, "has_gcie")) {
+                error_report("Using GICv5 but guest CPU does not support it");
+                exit(1);
+            }
+            object_property_set_bool(cpuobj, "has_gcie", true, NULL);
+        }
+
         if (object_property_find(cpuobj, "reset-cbar")) {
             object_property_set_int(cpuobj, "reset-cbar",
                                     vms->memmap[VIRT_CPUPERIPHS].base,
-- 
2.43.0
Re: [PATCH 64/65] hw/arm/virt: Enable GICv5 CPU interface when using GICv5
Posted by Jonathan Cameron via qemu development 1 month ago
On Mon, 23 Feb 2026 17:02:11 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> If we are using the GICv5 in the virt board, we need to set the
> has_gcie property on the CPU objects to tell them to implement the
> cpu interface part of GICv5.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>