]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/arm: Introduce ARMCPU.sme_max_vq
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 4 Jul 2025 14:19:47 +0000 (08:19 -0600)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 4 Jul 2025 14:52:21 +0000 (15:52 +0100)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250704142112.1018902-25-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h
target/arm/cpu64.c

index 39a9234ff285e4eb355d2b1ce15e31eda5d2662c..c8cf0ab417bd476c1d1c36cf2a0ed96b4d185f11 100644 (file)
@@ -1136,6 +1136,7 @@ struct ArchCPU {
 
     /* Used to set the maximum vector length the cpu will support.  */
     uint32_t sve_max_vq;
+    uint32_t sme_max_vq;
 
 #ifdef CONFIG_USER_ONLY
     /* Used to set the default vector length at process start. */
index 77e7c4a6a52b0b6c95cba6355b899aeaabd15ad6..bd33d6cc6ea572edecd45f65d42771a9d2a5c882 100644 (file)
@@ -363,6 +363,7 @@ void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp)
     }
 
     cpu->sme_vq.map = vq_map;
+    cpu->sme_max_vq = 32 - clz32(vq_map);
 }
 
 static bool cpu_arm_get_sme(Object *obj, Error **errp)