KVM: VMX: avoid guest hang on invalid invept instruction
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Mar 2016 15:53:29 +0000 (16:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Mar 2016 11:02:38 +0000 (12:02 +0100)
A guest executing an invalid invept instruction would hang
because the instruction pointer was not updated.

Cc: stable@vger.kernel.org
Fixes: bfd0a56b90005f8c8a004baf407ad90045c2b11e
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c

index 75173efccac552c48472f95fc2729d410628c139..01f515873637cefd4fde957dadd5ea4ecd734fe9 100644 (file)
@@ -7399,6 +7399,7 @@ static int handle_invept(struct kvm_vcpu *vcpu)
        if (!(types & (1UL << type))) {
                nested_vmx_failValid(vcpu,
                                VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
+               skip_emulated_instruction(vcpu);
                return 1;
        }