[PATCH kvmtool] aarch64: Give up with MTE for AArch32 guest

Vladimir Murzin vladimir.murzin at arm.com
Fri May 20 05:38:44 PDT 2022


KVM doesn't support combination of MTE and AArch32 guest, so do not
even try.

Signed-off-by: Vladimir Murzin <vladimir.murzin at arm.com>
---
 arm/aarch64/kvm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c
index 1b992dd..f3fe854 100644
--- a/arm/aarch64/kvm.c
+++ b/arm/aarch64/kvm.c
@@ -120,6 +120,11 @@ void kvm__arch_enable_mte(struct kvm *kvm)
 		.cap = KVM_CAP_ARM_MTE,
 	};
 
+	if (kvm->cfg.arch.aarch32_guest) {
+		pr_debug("MTE is incompatible with AArch32");
+		return;
+	}
+
 	if (kvm->cfg.arch.mte_disabled) {
 		pr_debug("MTE disabled by user");
 		return;
-- 
2.25.1




More information about the linux-arm-kernel mailing list