From: Philippe Mathieu-Daudé Date: Wed, 25 Jun 2025 21:54:17 +0000 (+0200) Subject: target/arm: Only allow disabling NEON when using TCG X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f46f05b6d88faff6f46ee38ca956b0c16f8935fb;p=thirdparty%2Fqemu.git target/arm: Only allow disabling NEON when using TCG Only allow disabling NEON when using TCG. This avoids confusing user experience: $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=off,vfp=off,vfp-d32=off qemu-system-aarch64: AArch64 CPUs must have both VFP and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=off,vfp=off,vfp-d32=off qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=off,vfp=off,vfp-d32=off qemu-system-aarch64: can't apply global host-arm-cpu.vfp-d32=off: Property 'host-arm-cpu.vfp-d32' not found Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-20-philmd@linaro.org> --- diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c1087bf5b9..05fa3339b1 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1460,7 +1460,7 @@ static void arm_cpu_post_init(Object *obj) if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) { cpu->has_neon = true; - if (!kvm_enabled()) { + if (tcg_enabled() || qtest_enabled()) { qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_property); } }