KVM: VMX: Move skip_emulated_instruction out of nested_vmx_check_vmcs12
authorKyle Huey <me@kylehuey.com>
Tue, 29 Nov 2016 20:40:39 +0000 (12:40 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Dec 2016 14:31:04 +0000 (15:31 +0100)
commiteb2775621701e6ee3ea2a474437d04e93ccdcb2f
tree8fc49dc116f75a2e045c9b39dbdf425e59a8ca7d
parent09ca3f20492fb0b03060b56a47afa211476740a8
KVM: VMX: Move skip_emulated_instruction out of nested_vmx_check_vmcs12

We can't return both the pass/fail boolean for the vmcs and the upcoming
continue/exit-to-userspace boolean for skip_emulated_instruction out of
nested_vmx_check_vmcs, so move skip_emulated_instruction out of it instead.

Additionally, VMENTER/VMRESUME only trigger singlestep exceptions when
they advance the IP to the following instruction, not when they a) succeed,
b) fail MSR validation or c) throw an exception. Add a separate call to
skip_emulated_instruction that will later not be converted to the variant
that checks the singlestep flag.

Signed-off-by: Kyle Huey <khuey@kylehuey.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c