Skip to content

Commit c79eb77

Browse files
Qiangcybonzini
authored andcommitted
KVM: nVMX: add CR4_LA57 bit to nested CR4_FIXED1
When L1 guest uses 5-level paging, it fails vm-entry to L2 due to invalid host-state. It needs to add CR4_LA57 bit to nested CR4_FIXED1 MSR. Signed-off-by: Chenyi Qiang <[email protected]> Reviewed-by: Xiaoyao Li <[email protected]> Reviewed-by: Liran Alon <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent cc87767 commit c79eb77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6962,6 +6962,7 @@ static void nested_vmx_cr_fixed1_bits_update(struct kvm_vcpu *vcpu)
69626962
cr4_fixed1_update(X86_CR4_SMAP, ebx, bit(X86_FEATURE_SMAP));
69636963
cr4_fixed1_update(X86_CR4_PKE, ecx, bit(X86_FEATURE_PKU));
69646964
cr4_fixed1_update(X86_CR4_UMIP, ecx, bit(X86_FEATURE_UMIP));
6965+
cr4_fixed1_update(X86_CR4_LA57, ecx, bit(X86_FEATURE_LA57));
69656966

69666967
#undef cr4_fixed1_update
69676968
}

0 commit comments

Comments
 (0)