]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
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)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 1 Jun 2024 04:20:31 +0000 (07:20 +0300)
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>
(cherry picked from commit daf9748ac002ec35258e5986b6257961fd04b565)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/arm/cpu64.c

index 3d74f134f57f5b6ecbad3115d211bd15e27df5fb..037e9d9feb40082220d4b3100fb463118f5f77a0 100644 (file)
@@ -190,7 +190,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;
         }