diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4dfb1dc09c88..2fdcc9819f36 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -1828,8 +1828,11 @@ static void exit_lmode(struct kvm_vcpu *vcpu) | |||
1828 | static void vmx_flush_tlb(struct kvm_vcpu *vcpu) | 1828 | static void vmx_flush_tlb(struct kvm_vcpu *vcpu) |
1829 | { | 1829 | { |
1830 | vpid_sync_context(to_vmx(vcpu)); | 1830 | vpid_sync_context(to_vmx(vcpu)); |
1831 | if (enable_ept) | 1831 | if (enable_ept) { |
1832 | if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) | ||
1833 | return; | ||
1832 | ept_sync_context(construct_eptp(vcpu->arch.mmu.root_hpa)); | 1834 | ept_sync_context(construct_eptp(vcpu->arch.mmu.root_hpa)); |
1835 | } | ||
1833 | } | 1836 | } |
1834 | 1837 | ||
1835 | static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu) | 1838 | static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu) |