40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
|
|
From a113ddc33b432c8b4d21160dccb54ba19580ab01 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Gao Jiazhen <gaojiazhen_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Thu, 12 Sep 2024 11:22:56 +0800
|
||
|
|
Subject: [PATCH] target/arm: Disable SVE extensions when SVE is disabled
|
||
|
|
|
||
|
|
cherry picked from commit daf9748ac002ec35258e5986b6257961fd04b565
|
||
|
|
|
||
|
|
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>
|
||
|
|
Signed-off-by: Gao Jiazhen <gaojiazhen_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
target/arm/cpu64.c | 5 +++++
|
||
|
|
1 file changed, 5 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
|
||
|
|
index 5d28838175..6eca55ac29 100644
|
||
|
|
--- a/target/arm/cpu64.c
|
||
|
|
+++ b/target/arm/cpu64.c
|
||
|
|
@@ -110,6 +110,11 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
|
||
|
|
*/
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|