aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sean Christopherson <seanjc@google.com> 2021-07-13 09:32:45 -0700
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2021-08-02 11:01:50 -0400
commit61152cd907d59ffd6b0a9479b2fa3b3b7b080409 (patch)
tree8cbb13ab0a5ad32036912b6cb0cff39aee4e4f06
parentKVM: SVM: Fall back to KVM's hardcoded value for EDX at RESET/INIT (diff)
downloadlinux-61152cd907d59ffd6b0a9479b2fa3b3b7b080409.tar.gz
linux-61152cd907d59ffd6b0a9479b2fa3b3b7b080409.tar.bz2
linux-61152cd907d59ffd6b0a9479b2fa3b3b7b080409.zip
KVM: VMX: Remove explicit MMU reset in enter_rmode()
Drop an explicit MMU reset when entering emulated real mode now that the vCPU INIT/RESET path correctly handles conditional MMU resets, e.g. if INIT arrives while the vCPU is in 64-bit mode. Note, while there are multiple other direct calls to vmx_set_cr0(), i.e. paths that change CR0 without invoking kvm_post_set_cr0(), only the INIT emulation can reach enter_rmode(). CLTS emulation only toggles CR.TS, VM-Exit (and late VM-Fail) emulation cannot architecturally transition to Real Mode, and VM-Enter to Real Mode is possible if and only if Unrestricted Guest is enabled (exposed to L1). This effectively reverts commit 8668a3c468ed ("KVM: VMX: Reset mmu context when entering real mode") Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210713163324.627647-8-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/vmx/vmx.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 6946a5161d38..207393a429d1 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2852,8 +2852,6 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
fix_rmode_seg(VCPU_SREG_DS, &vmx->rmode.segs[VCPU_SREG_DS]);
fix_rmode_seg(VCPU_SREG_GS, &vmx->rmode.segs[VCPU_SREG_GS]);
fix_rmode_seg(VCPU_SREG_FS, &vmx->rmode.segs[VCPU_SREG_FS]);
-
- kvm_mmu_reset_context(vcpu);
}
int vmx_set_efer(struct kvm_vcpu *vcpu, u64 efer)