]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Skip emulation required checks during pmode/rmode transitions
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:06 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:55 +0000 (11:01 -0400)
commitefc00db3969fefd8b084273f4dc37d0475725759
treed8dbbc467e9f603069e936ab120a6d72fae3754b
parent0ed1b20e8674ee69f78bf7043073a3c448742b14
KVM: VMX: Skip emulation required checks during pmode/rmode transitions

Don't refresh "emulation required" when stuffing segments during
transitions to/from real mode when running without unrestricted guest.
The checks are unnecessary as vmx_set_cr0() unconditionally rechecks
"emulation required".  They also happen to be broken, as enter_pmode()
and enter_rmode() run with a stale vcpu->arch.cr0.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-29-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c