All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cao, Lei" <Lei.Cao@stratus.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: [PATCH] KVM: VMX: do not exit to user space with error when PML full VMEXIT occurs during event delivery
Date: Fri, 15 Jul 2016 13:54:04 +0000	[thread overview]
Message-ID: <CY1PR08MB19928812C32DCE70A46AE33CF0330@CY1PR08MB1992.namprd08.prod.outlook.com> (raw)
In-Reply-To: 201607151313.u6FDDnDT017747@dev1.sn.stratus.com

With PML enabled, guest will shut down if a PML full VMEXIT occurs during
event delivery. According to Intel SDM 27.2.3, PML full VMEXIT can occur when
event is being delivered through IDT, so KVM should not exit to user space
with error. Instead, it should let EXIT_REASON_PML_FULL go through and the
event will be re-injected on the next VMENTRY.

Signed-off-by: Lei Cao <lei.cao@stratus.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 64a79f2..85bf9f3 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8224,6 +8224,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
 	if ((vectoring_info & VECTORING_INFO_VALID_MASK) &&
 			(exit_reason != EXIT_REASON_EXCEPTION_NMI &&
 			exit_reason != EXIT_REASON_EPT_VIOLATION &&
+			exit_reason != EXIT_REASON_PML_FULL &&
 			exit_reason != EXIT_REASON_TASK_SWITCH)) {
 		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
-- 
2.5.0


       reply	other threads:[~2016-07-15 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201607151313.u6FDDnDT017747@dev1.sn.stratus.com>
2016-07-15 13:54 ` Cao, Lei [this message]
2016-07-15 18:28   ` [PATCH] KVM: VMX: do not exit to user space with error when PML full VMEXIT occurs during event delivery Cao, Lei
2016-07-16 13:10     ` Radim Krčmář
2016-07-18  6:56       ` Yang Zhang

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=CY1PR08MB19928812C32DCE70A46AE33CF0330@CY1PR08MB1992.namprd08.prod.outlook.com \
    --to=lei.cao@stratus.com \
    --cc=kvm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.