Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: arm64: Force trap of GMID_EL1 when the guest doesn't have MTE

If our host has MTE, but the guest doesn't, make sure we set HCR_EL2.TID5
to force GMID_EL1 being trapped. Such trap will be handled by the
FEAT_IDST handling.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>
Link: https://patch.msgid.link/20260108173233.2911955-7-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>

+2
+2
arch/arm64/kvm/sys_regs.c
··· 5576 5576 5577 5577 if (kvm_has_mte(vcpu->kvm)) 5578 5578 vcpu->arch.hcr_el2 |= HCR_ATA; 5579 + else 5580 + vcpu->arch.hcr_el2 |= HCR_TID5; 5579 5581 5580 5582 /* 5581 5583 * In the absence of FGT, we cannot independently trap TLBI