From: Robert Richter <rrichter@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
linux-kernel@vger.kernel.org, jgross@suse.com,
tglx@linutronix.de, x86@kernel.org,
Kim Phillips <kim.phillips@amd.com>,
Robert Richter <rric@kernel.org>
Subject: Re: [PATCH 2/4] perf/x86/ibs: Use CPUID region helper
Date: Mon, 22 Apr 2024 23:30:24 +0200 [thread overview]
Message-ID: <ZibW8D9-CTd8G-_v@rric.localdomain> (raw)
In-Reply-To: <20240422204146.GCZibLiqZhbY1J4qFJ@fat_crate.local>
On 22.04.24 22:41:46, Borislav Petkov wrote:
> On Mon, Apr 22, 2024 at 10:09:57PM +0200, Robert Richter wrote:
> > Since we check get_cpuid_region_leaf()'s return code here we know if
> > the cpud leaf exists and return IBS_CAPS_DEFAULT if not. That would
> > not change the refB behaviour.
>
> Yes.
>
> > Though I think that case is rare or even not existing, I would just
> > keep the implementation like that and as it was for for years.
>
> Yes.
>
> > > > This slightly modifies the functionality so that 0 is return if
> > > > !IBS_CAPS_AVAIL (instead of IBS_CAPS_DEFAULT).
> > >
> > > If !IBS_CAPS_AVAIL, then this is revB. But then you want to return
> > > IBS_CAPS_DEFAULT there.
> >
> > No, on a rebB get_cpuid_region_leaf() would be false, meaning the
> > cpuid leaf is missing, function returns with IBS_CAPS_DEFAULT then.
>
> So what functionality modification do you mean then?
>
> When will IBS_CAPS_AVAIL be not set?
I mean the case where the cpuid leaf exists but IBS_CAPS_AVAIL is
clear. That could be possible with some cpuid override e.g. in virt
envs.
>
> GH BKDG says about that bit:
>
> "IBSFFV. IBS feature flags valid. Revision B = 0. Revision C = 1."
>
> so that has been set ever since on >= revC.
>
> And on revB we'll return IBS_CAPS_DEFAULT which has IBS_CAPS_AVAIL.
Yes, all this is correct.
>
> IOW, I don't see how we'll return 0 if !IBS_CAPS_AVAIL because latter
> doesn't happen practically with that flow.
Not on real hardware and if future systems not decide to enable IBS
feature bit and clear IBS_CAPS_AVAIL, which could be a valid case IMO.
Thanks,
-Robert
>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2024-04-22 21:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 15:35 [PATCH 0/4] [v2] x86: Add CPUID region helper and clarify Xen startup Dave Hansen
2024-04-03 15:35 ` [PATCH 1/4] x86/cpu: Add and use new CPUID region helper Dave Hansen
2024-04-04 9:04 ` Jürgen Groß
2024-04-08 16:25 ` Borislav Petkov
2024-04-03 15:35 ` [PATCH 2/4] perf/x86/ibs: Use " Dave Hansen
2024-04-16 15:12 ` Borislav Petkov
2024-04-16 15:23 ` Dave Hansen
2024-04-16 17:48 ` Borislav Petkov
2024-04-18 12:05 ` Robert Richter
2024-04-22 17:20 ` Borislav Petkov
2024-04-22 20:09 ` Robert Richter
2024-04-22 20:41 ` Borislav Petkov
2024-04-22 21:30 ` Robert Richter [this message]
2024-04-22 21:45 ` Borislav Petkov
2024-04-23 7:45 ` Robert Richter
2024-04-23 8:33 ` Borislav Petkov
2024-04-03 15:35 ` [PATCH 3/4] x86/boot: Explicitly pass NX enabling status Dave Hansen
2024-04-04 10:33 ` Jürgen Groß
2024-04-03 15:35 ` [PATCH 4/4] x86/xen: Enumerate NX from CPUID directly Dave Hansen
2024-04-04 10:44 ` Jürgen Groß
2024-04-04 14:24 ` Dave Hansen
2024-04-04 15:05 ` Sean Christopherson
2024-04-22 17:44 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2024-03-22 17:56 [PATCH 0/4] x86: Add CPUID region helper and clarify Xen startup Dave Hansen
2024-03-22 17:56 ` [PATCH 2/4] perf/x86/ibs: Use CPUID region helper Dave Hansen
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=ZibW8D9-CTd8G-_v@rric.localdomain \
--to=rrichter@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jgross@suse.com \
--cc=kim.phillips@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rric@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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 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®