aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoelle van Dyne <j@getutm.app>2025-02-24 08:57:34 -0800
committerPeter Maydell <peter.maydell@linaro.org>2025-02-25 15:32:58 +0000
commitfd207677a83087454b8afef31651985a1df0d2dd (patch)
treeecc6c51f3693281666b2aa7db059d22116856689
parentcb8bb8472ef83d8c8c6beac37d6db47ab3b68e18 (diff)
downloadqemu-fd207677a83087454b8afef31651985a1df0d2dd.zip
qemu-fd207677a83087454b8afef31651985a1df0d2dd.tar.gz
qemu-fd207677a83087454b8afef31651985a1df0d2dd.tar.bz2
target/arm/hvf: Disable SME feature
macOS 15.2's Hypervisor.framework exposes SME feature on M4 Macs. However, QEMU's hvf accelerator code does not properly support it yet, causing QEMU to fail to start when hvf accelerator is used on these systems, with the error message: qemu-aarch64-softmmu: cannot disable sme4224 All SME vector lengths are disabled. With SME enabled, at least one vector length must be enabled. Ideally we would have SME support on these hosts; however, until that point, we must suppress the SME feature in the ID registers, so that users can at least run non-SME guests. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2665 Signed-off-by: Joelle van Dyne <j@getutm.app> Message-id: 20250224165735.36792-1-j@getutm.app Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: expanded commit message, comment] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/hvf/hvf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 0afd960..872a25b 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -899,6 +899,18 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
clamp_id_aa64mmfr0_parange_to_ipa_size(&host_isar.id_aa64mmfr0);
+ /*
+ * Disable SME, which is not properly handled by QEMU hvf yet.
+ * To allow this through we would need to:
+ * - make sure that the SME state is correctly handled in the
+ * get_registers/put_registers functions
+ * - get the SME-specific CPU properties to work with accelerators
+ * other than TCG
+ * - fix any assumptions we made that SME implies SVE (since
+ * on the M4 there is SME but not SVE)
+ */
+ host_isar.id_aa64pfr1 &= ~R_ID_AA64PFR1_SME_MASK;
+
ahcf->isar = host_isar;
/*