aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/arm/virt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 46a42502bc..d2e5ecd234 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1852,7 +1852,12 @@ static void finalize_gic_version(VirtMachineState *vms)
vms->gic_version = VIRT_GIC_VERSION_2;
break;
case VIRT_GIC_VERSION_MAX:
- vms->gic_version = VIRT_GIC_VERSION_3;
+ if (module_object_class_by_name("arm-gicv3")) {
+ /* CONFIG_ARM_GICV3_TCG was set */
+ vms->gic_version = VIRT_GIC_VERSION_3;
+ } else {
+ vms->gic_version = VIRT_GIC_VERSION_2;
+ }
break;
case VIRT_GIC_VERSION_HOST:
error_report("gic-version=host requires KVM");