On 2/26/26 18:25, Manos Pitsidianakis wrote:
Starting from M4 cores and MacOS 15.2 SDK, HVF can virtualise FEAT_SME2.
Reviewed-by: Mohamed Mediouni <[email protected]>
Signed-off-by: Manos Pitsidianakis <[email protected]>
---
target/arm/cpu64.c | 13 ++++++++++++-
target/arm/hvf/hvf.c | 25 +++++++++++++------------
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index
dec430c48b92a8bf6bb8a9d247c23d5e7edb9c2b..c9991881f2e6cc39c9f3884efafae11bd210ed61
100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -340,9 +340,20 @@ void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp)
{
uint32_t vq_map = cpu->sme_vq.map;
uint32_t vq_init = cpu->sme_vq.init;
- uint32_t vq_supported = cpu->sme_vq.supported;
+ uint32_t vq_supported;
uint32_t vq;
+ if (hvf_enabled()) {
+ if (hvf_arm_sme2_supported()) {
+ vq_supported = hvf_arm_sme2_get_svl();
+ } else {
+ assert(!cpu_isar_feature(aa64_sme, cpu));
+ vq_supported = 0;
+ }
+ } else {
+ vq_supported = cpu->sme_vq.supported;
+ }
After the cleanup just merged to master, you should now set cpu->sme_vq.supported in
hvf_arm_set_cpu_features_from_host.
Compare commit 5b3feb36aec for kvm+svm.
r~