[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 32/45] target/arm: Enable SME for -cpu max
From: |
Richard Henderson |
Subject: |
[PATCH v4 32/45] target/arm: Enable SME for -cpu max |
Date: |
Tue, 28 Jun 2022 09:51:04 +0530 |
Note that SME remains effectively disabled for user-only,
because we do not yet set CPACR_EL1.SMEN. This needs to
wait until the kernel ABI is implemented.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
docs/system/arm/emulation.rst | 4 ++++
target/arm/cpu64.c | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst
index 83b4410065..8e494c8bea 100644
--- a/docs/system/arm/emulation.rst
+++ b/docs/system/arm/emulation.rst
@@ -65,6 +65,10 @@ the following architecture extensions:
- FEAT_SHA512 (Advanced SIMD SHA512 instructions)
- FEAT_SM3 (Advanced SIMD SM3 instructions)
- FEAT_SM4 (Advanced SIMD SM4 instructions)
+- FEAT_SME (Scalable Matrix Extension)
+- FEAT_SME_FA64 (Full A64 instruction set in Streaming SVE mode)
+- FEAT_SME_F64F64 (Double-precision floating-point outer product instructions)
+- FEAT_SME_I16I64 (16-bit to 64-bit integer widening outer product
instructions)
- FEAT_SPECRES (Speculation restriction instructions)
- FEAT_SSBS (Speculative Store Bypass Safe)
- FEAT_TLBIOS (TLB invalidate instructions in Outer Shareable domain)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 19188d6cc2..40a0f043d0 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -1018,6 +1018,7 @@ static void aarch64_max_initfn(Object *obj)
*/
t = FIELD_DP64(t, ID_AA64PFR1, MTE, 3); /* FEAT_MTE3 */
t = FIELD_DP64(t, ID_AA64PFR1, RAS_FRAC, 0); /* FEAT_RASv1p1 +
FEAT_DoubleFault */
+ t = FIELD_DP64(t, ID_AA64PFR1, SME, 1); /* FEAT_SME */
t = FIELD_DP64(t, ID_AA64PFR1, CSV2_FRAC, 0); /* FEAT_CSV2_2 */
cpu->isar.id_aa64pfr1 = t;
@@ -1068,6 +1069,16 @@ static void aarch64_max_initfn(Object *obj)
t = FIELD_DP64(t, ID_AA64DFR0, PMUVER, 5); /* FEAT_PMUv3p4 */
cpu->isar.id_aa64dfr0 = t;
+ t = cpu->isar.id_aa64smfr0;
+ t = FIELD_DP64(t, ID_AA64SMFR0, F32F32, 1); /* FEAT_SME */
+ t = FIELD_DP64(t, ID_AA64SMFR0, B16F32, 1); /* FEAT_SME */
+ t = FIELD_DP64(t, ID_AA64SMFR0, F16F32, 1); /* FEAT_SME */
+ t = FIELD_DP64(t, ID_AA64SMFR0, I8I32, 0xf); /* FEAT_SME */
+ t = FIELD_DP64(t, ID_AA64SMFR0, F64F64, 1); /* FEAT_SME_F64F64 */
+ t = FIELD_DP64(t, ID_AA64SMFR0, I16I64, 0xf); /* FEAT_SME_I16I64 */
+ t = FIELD_DP64(t, ID_AA64SMFR0, FA64, 1); /* FEAT_SME_FA64 */
+ cpu->isar.id_aa64smfr0 = t;
+
/* Replicate the same data to the 32-bit id registers. */
aa32_max_features(cpu);
--
2.34.1
- [PATCH v4 23/45] target/arm: Implement SME ADDHA, ADDVA, (continued)
- [PATCH v4 23/45] target/arm: Implement SME ADDHA, ADDVA, Richard Henderson, 2022/06/28
- [PATCH v4 25/45] target/arm: Implement BFMOPA, BFMOPS, Richard Henderson, 2022/06/28
- [PATCH v4 22/45] target/arm: Implement SME LDR, STR, Richard Henderson, 2022/06/28
- [PATCH v4 24/45] target/arm: Implement FMOPA, FMOPS (non-widening), Richard Henderson, 2022/06/28
- [PATCH v4 26/45] target/arm: Implement FMOPA, FMOPS (widening), Richard Henderson, 2022/06/28
- [PATCH v4 27/45] target/arm: Implement SME integer outer product, Richard Henderson, 2022/06/28
- [PATCH v4 28/45] target/arm: Implement PSEL, Richard Henderson, 2022/06/28
- [PATCH v4 29/45] target/arm: Implement REVD, Richard Henderson, 2022/06/28
- [PATCH v4 30/45] target/arm: Implement SCLAMP, UCLAMP, Richard Henderson, 2022/06/28
- [PATCH v4 31/45] target/arm: Reset streaming sve state on exception boundaries, Richard Henderson, 2022/06/28
- [PATCH v4 32/45] target/arm: Enable SME for -cpu max,
Richard Henderson <=
- [PATCH v4 33/45] linux-user/aarch64: Clear tpidr2_el0 if CLONE_SETTLS, Richard Henderson, 2022/06/28
- [PATCH v4 34/45] linux-user/aarch64: Reset PSTATE.SM on syscalls, Richard Henderson, 2022/06/28
- [PATCH v4 35/45] linux-user/aarch64: Add SM bit to SVE signal context, Richard Henderson, 2022/06/28
- [PATCH v4 37/45] linux-user/aarch64: Do not allow duplicate or short sve records, Richard Henderson, 2022/06/28
- [PATCH v4 38/45] linux-user/aarch64: Verify extra record lock succeeded, Richard Henderson, 2022/06/28
- [PATCH v4 39/45] linux-user/aarch64: Move sve record checks into restore, Richard Henderson, 2022/06/28
- [PATCH v4 36/45] linux-user/aarch64: Tidy target_restore_sigframe error return, Richard Henderson, 2022/06/28
- [PATCH v4 40/45] linux-user/aarch64: Implement SME signal handling, Richard Henderson, 2022/06/28
- [PATCH v4 41/45] linux-user: Rename sve prctls, Richard Henderson, 2022/06/28
- [PATCH v4 42/45] linux-user/aarch64: Implement PR_SME_GET_VL, PR_SME_SET_VL, Richard Henderson, 2022/06/28