KVM: nVMX: don't reset kvm mmu twice
authorWanpeng Li <wanpeng.li@hotmail.com>
Sun, 12 Mar 2017 08:53:52 +0000 (00:53 -0800)
committerRadim Krčmář <rkrcmar@redhat.com>
Mon, 20 Mar 2017 15:25:06 +0000 (16:25 +0100)
kvm mmu is reset once successfully loading CR3 as part of emulating vmentry
in nested_vmx_load_cr3(). We should not reset kvm mmu twice.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c

index e7ec88961b1a45b081f750b64edd7aaff4827c6b..c66436530a93af66063f7d6eee668c0e226cac90 100644 (file)
@@ -10287,8 +10287,6 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
                                entry_failure_code))
                return 1;
 
-       kvm_mmu_reset_context(vcpu);
-
        if (!enable_ept)
                vcpu->arch.walk_mmu->inject_page_fault = vmx_inject_page_fault_nested;