kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly
authorJim Mattson <jmattson@google.com>
Thu, 14 Sep 2017 23:31:42 +0000 (16:31 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Sep 2017 14:57:15 +0000 (16:57 +0200)
commitb060ca3b2e9e72ef005e2042476f95ee0b8839e9
treed51154ca20d49fc64132e0c46e70d439093a4b72
parent7881f96cac4d420c94e62a4e1eea243899a7052e
kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly

On an early VMLAUNCH/VMRESUME failure (i.e. one which sets the
VM-instruction error field of the current VMCS), the launch state of
the current VMCS is not set to "launched," and the VM-exit information
fields of the current VMCS (including IDT-vectoring information and
exit reason) are stale.

On a late VMLAUNCH/VMRESUME failure (i.e. one which sets the high bit
of the exit reason field), the launch state of the current VMCS is not
set to "launched," and only two of the VM-exit information fields of
the current VMCS are modified (exit reason and exit
qualification). The remaining VM-exit information fields of the
current VMCS (including IDT-vectoring information, in particular) are
stale.

Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c