From e74c097638d38b46d9c68f11565432034afc0ad0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 20 Jun 2022 10:52:01 -0700 Subject: target/arm: Add cpu properties for SME Mirror the properties for SVE. The main difference is that any arbitrary set of powers of 2 may be supported, and not the stricter constraints that apply to SVE. Include a property to control FEAT_SME_FA64, as failing to restrict the runtime to the proper subset of insns could be a major point for bugs. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20220620175235.60881-18-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'target/arm/cpu.c') diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 660fd8b8b9..bb44ad45aa 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1123,11 +1123,13 @@ static void arm_cpu_initfn(Object *obj) #ifdef CONFIG_USER_ONLY # ifdef TARGET_AARCH64 /* - * The linux kernel defaults to 512-bit vectors, when sve is supported. - * See documentation for /proc/sys/abi/sve_default_vector_length, and - * our corresponding sve-default-vector-length cpu property. + * The linux kernel defaults to 512-bit for SVE, and 256-bit for SME. + * These values were chosen to fit within the default signal frame. + * See documentation for /proc/sys/abi/{sve,sme}_default_vector_length, + * and our corresponding cpu property. */ cpu->sve_default_vq = 4; + cpu->sme_default_vq = 2; # endif #else /* Our inbound IRQ and FIQ lines */ @@ -1430,6 +1432,12 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp) return; } + arm_cpu_sme_finalize(cpu, &local_err); + if (local_err != NULL) { + error_propagate(errp, local_err); + return; + } + arm_cpu_pauth_finalize(cpu, &local_err); if (local_err != NULL) { error_propagate(errp, local_err); -- cgit 1.4.1