From: Sean Christopherson <seanjc@google.com>
To: Tianyi Liu <i.pear@outlook.com>
Cc: 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 07:04:35 -0700 [thread overview]
Message-ID: <ZOypc+LeHdE5u0MC@google.com> (raw)
In-Reply-To: <SY4P282MB10841E53BAF421675FCE991D9DE0A@SY4P282MB1084.AUSP282.PROD.OUTLOOK.COM>
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
next prev parent reply other threads:[~2023-08-28 14:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 9:07 [PATCH] KVM: VMX: Fix NMI event loss Tianyi Liu
2023-08-28 14:04 ` Sean Christopherson [this message]
2023-08-28 15:53 ` Tianyi Liu
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=ZOypc+LeHdE5u0MC@google.com \
--to=seanjc@google.com \
--cc=i.pear@outlook.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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