OSDN Git Service

KVM: nVMX: Defer the MMU reload to the normal path on an EPTP switch
authorSean Christopherson <seanjc@google.com>
Fri, 5 Mar 2021 01:10:57 +0000 (17:10 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:42:21 +0000 (04:42 -0400)
commitc805f5d5585ab5e0cdac6b1ccf7086eb120fb7db
tree6f35d7b94c286a6646b774184bcc95e90dbca656
parent17e368d94af77c1533bfd4136e080a33a6330282
KVM: nVMX: Defer the MMU reload to the normal path on an EPTP switch

Defer reloading the MMU after a EPTP successful EPTP switch.  The VMFUNC
instruction itself is executed in the previous EPTP context, any side
effects, e.g. updating RIP, should occur in the old context.  Practically
speaking, this bug is benign as VMX doesn't touch the MMU when skipping
an emulated instruction, nor does queuing a single-step #DB.  No other
post-switch side effects exist.

Fixes: 41ab93727467 ("KVM: nVMX: Emulate EPTP switching for the L1 hypervisor")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210305011101.3597423-14-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c