diff options
author | Alexander Graf <agraf@csgraf.de> | 2022-12-23 10:01:07 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-02-03 12:59:22 +0000 |
commit | 5e91b9e03f6cbb0f8333e60422ef44c15b4775c7 (patch) | |
tree | d9fb70d341d0a92a94ae93a628d87b953e9237db /hw/arm/virt.c | |
parent | a3495d11c4970c6cac05da516439a4f74ff6db01 (diff) | |
download | qemu-5e91b9e03f6cbb0f8333e60422ef44c15b4775c7.zip qemu-5e91b9e03f6cbb0f8333e60422ef44c15b4775c7.tar.gz qemu-5e91b9e03f6cbb0f8333e60422ef44c15b4775c7.tar.bz2 |
hw/arm/virt: Make accels in GIC finalize logic explicit
Let's explicitly list out all accelerators that we support when trying to
determine the supported set of GIC versions. KVM was already separate, so
the only missing one is HVF which simply reuses all of TCG's emulation
code and thus has the same compatibility matrix.
Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221223090107.98888-3-agraf@csgraf.de
[PMM: Added qtest to the list of accelerators]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
-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 28c43d5..ba47728 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -47,8 +47,10 @@ #include "sysemu/numa.h" #include "sysemu/runstate.h" #include "sysemu/tpm.h" +#include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "sysemu/hvf.h" +#include "sysemu/qtest.h" #include "hw/loader.h" #include "qapi/error.h" #include "qemu/bitops.h" @@ -1929,7 +1931,7 @@ static void finalize_gic_version(VirtMachineState *vms) /* KVM w/o kernel irqchip can only deal with GICv2 */ gics_supported |= VIRT_GIC_VERSION_2_MASK; accel_name = "KVM with kernel-irqchip=off"; - } else { + } else if (tcg_enabled() || hvf_enabled() || qtest_enabled()) { gics_supported |= VIRT_GIC_VERSION_2_MASK; if (module_object_class_by_name("arm-gicv3")) { gics_supported |= VIRT_GIC_VERSION_3_MASK; @@ -1938,6 +1940,9 @@ static void finalize_gic_version(VirtMachineState *vms) gics_supported |= VIRT_GIC_VERSION_4_MASK; } } + } else { + error_report("Unsupported accelerator, can not determine GIC support"); + exit(1); } /* |