From: Sean Christopherson <seanjc@google.com>
To: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: sashiko@lists.linux.dev, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 1/9] perf/x86/intel: Ensure guest PEBS path doesn't set unwanted PERF_GLOBAL_CTRL bits
Date: Thu, 21 May 2026 07:04:41 -0700 [thread overview]
Message-ID: <ag8Q-UM5dcVtBijd@google.com> (raw)
In-Reply-To: <a75397bd-6122-4fa8-8197-334b2fbbb5af@linux.intel.com>
On Thu, May 21, 2026, Dapeng Mi wrote:
> On 5/15/2026 9:49 AM, Mi, Dapeng wrote:
> > On 5/15/2026 8:01 AM, Sean Christopherson wrote:
> >>> Anyway, we could optimize the code further like below and thoroughly filter
> >>> away these extra bits. (only building, not test on real HW)
> >> Hmm, I think I'd rather figure out what it would take to drop the FIXME entirely.
> >> And if we need to keep the check, I'm a-ok risking false positives until we have
> >> a better understanding of why the check exists.
> > Kan Liang should be the best man who knows the history, but he has left
> > Intel. I would check this with other guys internally and look at if they
> > know the reason.
>
> Just checked the commit history, It looks the reason of disabling guest
> PEBS here is to avoid breaking the host !exclude_guest PEBS event sampling.
> Host may create !exclude_guest event to profile both root and non-root
> mode, but it's conflicted with guest PEBS sampling in non-root mode. So
> guest PEBS sampling has to be disabled if there are active host PEBS
> events. Thanks.
But that doesn't make any sense, because the host can't use PEBS to sample non-root
mode due to the DS area being virtually addressed. It's entirely possible that
was pure oversight, given that commit 58f6217e5d01 ("perf/x86/intel: KVM: Mask
PEBS_ENABLE loaded for guest with vCPU's value.") was necessary.
But I'm still not convinced: if that _really_ was the motivation, then I would
hope that scenario was at least smoke tested, and any testing whatsoever would
have crashed the guest.
Though given how buggy this code has been, I suppose it's plausible there was
simply testing.
next prev parent reply other threads:[~2026-05-21 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260508231353.406465-2-seanjc@google.com>
[not found] ` <20260508234018.F06AEC2BCB0@smtp.kernel.org>
2026-05-12 11:30 ` [PATCH v3 1/9] perf/x86/intel: Ensure guest PEBS path doesn't set unwanted PERF_GLOBAL_CTRL bits Mi, Dapeng
2026-05-15 0:01 ` Sean Christopherson
2026-05-15 1:49 ` Mi, Dapeng
2026-05-21 11:29 ` Mi, Dapeng
2026-05-21 14:04 ` Sean Christopherson [this message]
2026-05-22 2:26 ` Mi, Dapeng
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=ag8Q-UM5dcVtBijd@google.com \
--to=seanjc@google.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko@lists.linux.dev \
/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