target/arm: Disable SVE extensions when SVE is disabled
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Sun, 26 May 2024 20:45:51 +0000 (13:45 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 30 May 2024 14:45:21 +0000 (15:45 +0100)
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2304
Reported-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-id: 20240526204551.553282-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu64.c

index c15d086049fda85213ecdc11a240aa272d536f0b..862d2b92fa4a4b0e6f695edf92950cb1e1766cde 100644 (file)
@@ -109,7 +109,11 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
          * No explicit bits enabled, and no implicit bits from sve-max-vq.
          */
         if (!cpu_isar_feature(aa64_sve, cpu)) {
-            /* SVE is disabled and so are all vector lengths.  Good. */
+            /*
+             * SVE is disabled and so are all vector lengths.  Good.
+             * Disable all SVE extensions as well.
+             */
+            cpu->isar.id_aa64zfr0 = 0;
             return;
         }