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

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

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