BACKPORT: FROMGIT: KVM: arm64: Fix FEAT_MTE in pKVM
Make sure we do not trap access to Allocation Tags.
Bug: 357781595
Fixes: b56680de9c64 ("KVM: arm64: Initialize trap register values in hyp in pKVM")
Link: https://lore.kernel.org/all/20250106112421.65355-1-vladimir.murzin@arm.com/
(cherry picked from commit b7f345fbc32afab0f0b03c71c7eaf48b9a0ad7ed
https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git/ next)
[tabba@: partial backport of necessary change. No need to set the
kvm arch flag explicitly since in Android we already copy the
host's view of the flags for non-protected guests.]
Change-Id: Ica4e92c0abb8366fea64ef088f6b87b54412c9e3
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
This commit is contained in:
committed by
Fuad Tabba
parent
6c86d6f4fe
commit
ef0f14a669
@@ -61,6 +61,9 @@ static void pkvm_vcpu_reset_hcr(struct kvm_vcpu *vcpu)
|
||||
|
||||
if (vcpu_has_ptrauth(vcpu))
|
||||
vcpu->arch.hcr_el2 |= (HCR_API | HCR_APK);
|
||||
|
||||
if (kvm_has_mte(vcpu->kvm))
|
||||
vcpu->arch.hcr_el2 |= HCR_ATA;
|
||||
}
|
||||
|
||||
static void pkvm_vcpu_reset_hcrx(struct pkvm_hyp_vcpu *hyp_vcpu)
|
||||
|
||||
Reference in New Issue
Block a user