]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit1dd7a4f18fbcc0db1acc07df5c1ae8ba4ce10593
treed8dbbc467e9f603069e936ab120a6d72fae3754b
parent32437c2aea428f9c3479904e342b02f5eee3a7f6
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