summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-03-18 18:53:29 +0300
committerSasha Levin <sasha.levin@oracle.com>2016-04-18 15:49:37 +0300
commit7aae44c91487a1f7210a1fb7e3ed608f6f6ef653 (patch)
treeccac51d04c3eae8e44452ba3bf50eb0fce82082e /arch/x86
parent65d83d876f80afef16c27b62d79e160bf73df652 (diff)
downloadlinux-7aae44c91487a1f7210a1fb7e3ed608f6f6ef653.tar.xz
KVM: VMX: avoid guest hang on invalid invept instruction
[ Upstream commit 2849eb4f99d54925c543db12917127f88b3c38ff ] 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 49cce7508a54..d9c11f3f5b18 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6740,6 +6740,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;
}