kvm: nVMX: Fetch VM_INSTRUCTION_ERROR from vmcs02 on vmx->fail
authorJim Mattson <jmattson@google.com>
Tue, 6 Sep 2016 16:33:21 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 20:32:17 +0000 (21:32 +0100)
commitcf3215d9394aa115d0b34d1c93512f53e425db97
treeb3eac0eb674d1bf2d8703e863f9379bebac253fb
parent66d73e12f2786497424cb611b359e3580978cad7
kvm: nVMX: Fetch VM_INSTRUCTION_ERROR from vmcs02 on vmx->fail

When forwarding a hardware VM-entry failure to L1, fetch the
VM_INSTRUCTION_ERROR field from vmcs02 before loading vmcs01.

(Note that there is an implicit assumption that the VM-entry failure was
on the first VM-entry to vmcs02 after nested_vmx_run; otherwise, L1 is
going to be very confused.)

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Feiner <pfeiner@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c