]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 20 Apr 2016 20:53:39 +0000 (14:53 -0600)
BugLink: http://bugs.launchpad.net/bugs/1572722
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/x86/kvm/vmx.c

index 0958fa2b7cb727195cd0e855503eb54c413a5767..89d5e02b14aec11bc998020d9d460daab345afbb 100644 (file)
@@ -7340,6 +7340,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;
        }