]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:06:03 +0000 (00:06 +0200)
commit 2849eb4f99d54925c543db12917127f88b3c38ff upstream.

A guest executing an invalid invept instruction would hang
because the instruction pointer was not updated.

Fixes: bfd0a56b90005f8c8a004baf407ad90045c2b11e
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kvm/vmx.c

index e7cd4c833c40a2ea27d4cd36d0201de71ed4ca51..e890c0398d62eb42ee5286ba9f581c7a0e0d4ce3 100644 (file)
@@ -6601,6 +6601,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;
        }