Skip to content

Commit 70a5ce4

Browse files
author
Marc Zyngier
committed
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>
1 parent f07ef1b commit 70a5ce4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/arm64/kvm/sys_regs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5576,6 +5576,8 @@ static void vcpu_set_hcr(struct kvm_vcpu *vcpu)
55765576

55775577
if (kvm_has_mte(vcpu->kvm))
55785578
vcpu->arch.hcr_el2 |= HCR_ATA;
5579+
else
5580+
vcpu->arch.hcr_el2 |= HCR_TID5;
55795581

55805582
/*
55815583
* In the absence of FGT, we cannot independently trap TLBI

0 commit comments

Comments
 (0)