mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: jmontleo@redhat.com, bdas@redhat.com, stable@vger.kernel.org
Subject: [PATCH 1/3] KVM: VMX: avoid guest hang on invalid invept instruction
Date: Fri, 18 Mar 2016 17:09:37 +0100	[thread overview]
Message-ID: <1458317379-8363-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1458317379-8363-1-git-send-email-pbonzini@redhat.com>

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

Cc: stable@vger.kernel.org
Fixes: bfd0a56b90005f8c8a004baf407ad90045c2b11e
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/vmx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 5e45c2731a5d..17b20b52d30e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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;
 	}
 
-- 
1.8.3.1

  reply	other threads:[~2016-03-18 16:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 16:09 [PATCH 0/3] KVM: VMX: fix handling inv{ept,vpid} and nested RHEL6 KVM Paolo Bonzini
2016-03-18 16:09 ` Paolo Bonzini [this message]
2016-03-18 16:09 ` [PATCH 2/3] KVM: VMX: avoid guest hang on invalid invvpid instruction Paolo Bonzini
2016-03-18 16:09 ` [PATCH 3/3] KVM: VMX: fix nested vpid for old KVM guests Paolo Bonzini
2016-03-18 17:42 ` [PATCH 0/3] KVM: VMX: fix handling inv{ept,vpid} and nested RHEL6 KVM David Matlack
2016-03-18 17:58   ` Paolo Bonzini
2016-03-18 18:04     ` David Matlack
2016-03-19  9:53       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458317379-8363-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bdas@redhat.com \
    --cc=jmontleo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®