diff options
author | Eric Auger <eric.auger@redhat.com> | 2022-03-08 19:24:52 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-03-18 10:55:15 +0000 |
commit | 299b4a3ecf1c7dcc57e55150d4cb234340749854 (patch) | |
tree | 561be9787ba4bc9b77c673854dbffff79fea82ab /hw | |
parent | 16d91e06b37fca0772866e12d4e146a519841b0f (diff) |
hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
In TCG mode, if gic-version=max we always select GICv3 even if
CONFIG_ARM_GICV3_TCG is unset. We shall rather select GICv2.
This also brings the benefit of fixing qos tests errors for tests
using gic-version=max with CONFIG_ARM_GICV3_TCG unset.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 20220308182452.223473-3-eric.auger@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/virt.c | 7 |
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"); |