refactor(qemu): handle SPM_MM builds
SPM_MM is not compatible with ENABLE_SVE_FOR_NS and breaks build early:
> Including SPM Management Mode (MM) makefile
> services/std_svc/spm/spm_mm/spm_mm.mk:14: *** "Error: SPM_MM is not compatible with ENABLE_SVE_FOR_NS". Stop.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: Iabe181647fce00a432ae11dc4599b71619364c24
diff --git a/plat/qemu/common/common.mk b/plat/qemu/common/common.mk
index 947c05c..9d5e647 100644
--- a/plat/qemu/common/common.mk
+++ b/plat/qemu/common/common.mk
@@ -74,12 +74,18 @@
${QEMU_GIC_SOURCES}
# CPU flag enablement
+ifeq (${ARCH},aarch64)
# Later QEMU versions support SME and SVE.
-ifeq (${ARCH},aarch64)
+# SPM_MM is not compatible with ENABLE_SVE_FOR_NS (build breaks)
+ifeq (${SPM_MM},1)
+ ENABLE_SVE_FOR_NS := 0
+ ENABLE_SME_FOR_NS := 0
+else
ENABLE_SVE_FOR_NS := 2
ENABLE_SME_FOR_NS := 2
endif
+endif
# QEMU will use the RNDR instruction for the stack protector canary.
ENABLE_FEAT_RNG := 2