KVM: nVMX: Don't evaluate "emulation required" on nested VM-Exit
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:07 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:55 +0000 (11:01 -0400)
commit816be9e9be8d2e19dcea35fbec06f00cd5749fed
tree8373ca03d5bd65711bb68fe9cca9e7daf3bd1716
parent1dd7a4f18fbcc0db1acc07df5c1ae8ba4ce10593
KVM: nVMX: Don't evaluate "emulation required" on nested VM-Exit

Use the "internal" variants of setting segment registers when stuffing
state on nested VM-Exit in order to skip the "emulation required"
updates.  VM-Exit must always go to protected mode, and all segments are
mostly hardcoded (to valid values) on VM-Exit.  The bits of the segments
that aren't hardcoded are explicitly checked during VM-Enter, e.g. the
selector RPLs must all be zero.

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