File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ static void pkvm_vcpu_reset_hcr(struct kvm_vcpu *vcpu)
47
47
48
48
if (vcpu_has_ptrauth (vcpu ))
49
49
vcpu -> arch .hcr_el2 |= (HCR_API | HCR_APK );
50
+
51
+ if (kvm_has_mte (vcpu -> kvm ))
52
+ vcpu -> arch .hcr_el2 |= HCR_ATA ;
50
53
}
51
54
52
55
static void pvm_init_traps_hcr (struct kvm_vcpu * vcpu )
@@ -251,6 +254,9 @@ static void pkvm_init_features_from_host(struct pkvm_hyp_vm *hyp_vm, const struc
251
254
unsigned long host_arch_flags = READ_ONCE (host_kvm -> arch .flags );
252
255
DECLARE_BITMAP (allowed_features , KVM_VCPU_MAX_FEATURES );
253
256
257
+ if (test_bit (KVM_ARCH_FLAG_MTE_ENABLED , & host_kvm -> arch .flags ))
258
+ set_bit (KVM_ARCH_FLAG_MTE_ENABLED , & kvm -> arch .flags );
259
+
254
260
/* No restrictions for non-protected VMs. */
255
261
if (!kvm_vm_is_protected (kvm )) {
256
262
hyp_vm -> kvm .arch .flags = host_arch_flags ;
You can’t perform that action at this time.
0 commit comments