mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tianyi Liu <i.pear@outlook.com>
To: seanjc@google.com
Cc: i.pear@outlook.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] KVM: VMX: Fix NMI event loss
Date: Mon, 28 Aug 2023 23:53:43 +0800	[thread overview]
Message-ID: <SY4P282MB1084112AF3101FE83300ABFF9DE0A@SY4P282MB1084.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <ZOypc+LeHdE5u0MC@google.com>

On Mon, Aug 28, 2023, Sean Christopherson wrote:
> On Mon, Aug 28, 2023, Tianyi Liu wrote:
> > Hi, Sean:
> > 
> > I have found that in the latest version of the kernel, some PMU events are
> > being lost. I used bisect and found out the breaking commit [1], which
> > moved the handling of NMI events from `handle_exception_irqoff` to
> > `vmx_vcpu_enter_exit`.
> > 
> > If I revert this part as done in this patch, it works correctly. However,
> > I'm not really familiar with KVM, and I'm not sure about the intent behind
> > the original patch [1].
> 
> FWIW, the goal was to invoke vmx_do_nmi_irqoff() before leaving the "noinstr"
> region.  I messed up and forgot that vmx_get_intr_info() relied on metadata being
> reset after VM-Exit :-/
> 
> > Could you please take a look on this? Thanks a lot.
> 
> Please try this patch, it should fix the problem but I haven't fully tested it
> against an affected workload yet.  I'll do that later today.
> 
> https://lore.kernel.org/all/20230825014532.2846714-1-seanjc@google.com

This works for me, thanks.

      reply	other threads:[~2023-08-28 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28  9:07 Tianyi Liu
2023-08-28 14:04 ` Sean Christopherson
2023-08-28 15:53   ` Tianyi Liu [this message]

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=SY4P282MB1084112AF3101FE83300ABFF9DE0A@SY4P282MB1084.AUSP282.PROD.OUTLOOK.COM \
    --to=i.pear@outlook.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.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®