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>
---
hw/arm/virt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 15d833ad8f..0aff58bc3c 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2675,6 +2675,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