OSDN Git Service

KVM: nVMX: remove side effects from nested_vmx_exit_reflected
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 17 Mar 2020 17:32:50 +0000 (18:32 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Mar 2020 11:16:39 +0000 (12:16 +0100)
commit96b100cd1464ce41d5d6b083b1fe5ceace8eef8a
treebd75be7e9b2da14b2c744e52c7a5ac6dfae2e26f
parentbb03911f79f610c857cf82b8ccd434101dd05356
KVM: nVMX: remove side effects from nested_vmx_exit_reflected

The name of nested_vmx_exit_reflected suggests that it's purely
a test, but it actually marks VMCS12 pages as dirty.  Move this to
vmx_handle_exit, observing that the initial nested_run_pending check in
nested_vmx_exit_reflected is pointless---nested_run_pending has just
been cleared in vmx_vcpu_run and won't be set until handle_vmlaunch
or handle_vmresume.

Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/nested.h
arch/x86/kvm/vmx/vmx.c