mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chenyi Qiang <chenyi.qiang@intel.com>
Subject: Re: [PATCH 3/3] KVM: nVMX: Clear IDT vectoring on nested VM-Exit for double/triple fault
Date: Thu, 7 Apr 2022 16:02:07 +0800	[thread overview]
Message-ID: <a23077a5-777f-85fb-05fa-b91e21aca0e7@intel.com> (raw)
In-Reply-To: <20220407002315.78092-4-seanjc@google.com>

On 4/7/2022 8:23 AM, Sean Christopherson wrote:
> Clear the IDT vectoring field in vmcs12 on next VM-Exit due to a double
> or triple fault.  Per the SDM, a VM-Exit isn't considered to occur during
> event delivery if the exit is due to an intercepted double fault or a
> triple fault.  Opportunistically move the default clearing (no event
> "pending") into the helper so that it's more obvious that KVM does indeed
> handle this case.
> 
> Note, the double fault case is worded rather wierdly in the SDM:
> 
>    The original event results in a double-fault exception that causes the
>    VM exit directly.
> 
> Temporarily ignoring injected events, double faults can _only_ occur if
> an exception occurs while attempting to deliver a different exception,
> i.e. there's _always_ an original event.  And for injected double fault,
> while there's no original event, injected events are never subject to
> interception.
> 
> Presumably the SDM is calling out that a the vectoring info will be valid
> if a different exit occurs after a double fault, e.g. if a #PF occurs and
> is intercepted while vectoring #DF, then the vectoring info will show the
> double fault.  

Wouldn't it be a tripe fault exit in this case?

> In other words, the clause can simply be read as:
> 
>    The VM exit is caused by a double-fault exception.


  reply	other threads:[~2022-04-07  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  0:23 [PATCH 0/3] KVM: x86: Nested fixes (mostly #DF/#TF) Sean Christopherson
2022-04-07  0:23 ` [PATCH 1/3] KVM: x86: Drop WARNs that assert a triple fault never "escapes" from L2 Sean Christopherson
2022-04-07  0:23 ` [PATCH 2/3] KVM: nVMX: Leave most VM-Exit info fields unmodified on failed VM-Entry Sean Christopherson
2022-04-07  0:23 ` [PATCH 3/3] KVM: nVMX: Clear IDT vectoring on nested VM-Exit for double/triple fault Sean Christopherson
2022-04-07  8:02   ` Xiaoyao Li [this message]
2022-04-07  8:42     ` Xiaoyao Li
2022-04-08 16:50 ` [PATCH 0/3] KVM: x86: Nested fixes (mostly #DF/#TF) 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=a23077a5-777f-85fb-05fa-b91e21aca0e7@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=chenyi.qiang@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /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®