]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/arm/virt: Enable GICv5 CPU interface when using GICv5
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 27 Mar 2026 11:16:59 +0000 (11:16 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 7 May 2026 14:14:58 +0000 (15:14 +0100)
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>
Message-id: 20260327111700.795099-65-peter.maydell@linaro.org

hw/arm/virt.c

index 7da92e77469093f9fc66e95666956846e443340d..75b20cfc9a12e4f076ceef03cf041afc7a1b8529 100644 (file)
@@ -3017,6 +3017,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,