diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4c3fa0f67469..d48ec60ea421 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2047,7 +2047,8 @@ static void ept_update_paging_mode_cr0(unsigned long *hw_cr0, | |||
2047 | unsigned long cr0, | 2047 | unsigned long cr0, |
2048 | struct kvm_vcpu *vcpu) | 2048 | struct kvm_vcpu *vcpu) |
2049 | { | 2049 | { |
2050 | vmx_decache_cr3(vcpu); | 2050 | if (!test_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail)) |
2051 | vmx_decache_cr3(vcpu); | ||
2051 | if (!(cr0 & X86_CR0_PG)) { | 2052 | if (!(cr0 & X86_CR0_PG)) { |
2052 | /* From paging/starting to nonpaging */ | 2053 | /* From paging/starting to nonpaging */ |
2053 | vmcs_write32(CPU_BASED_VM_EXEC_CONTROL, | 2054 | vmcs_write32(CPU_BASED_VM_EXEC_CONTROL, |