[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240422204146.GCZibLiqZhbY1J4qFJ@fat_crate.local>
Date: Mon, 22 Apr 2024 22:41:46 +0200
From: Borislav Petkov <bp@...en8.de>
To: Robert Richter <rrichter@....com>
Cc: Dave Hansen <dave.hansen@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org, jgross@...e.com, tglx@...utronix.de,
x86@...nel.org, Kim Phillips <kim.phillips@....com>,
Robert Richter <rric@...nel.org>
Subject: Re: [PATCH 2/4] perf/x86/ibs: Use CPUID region helper
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?
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.
IOW, I don't see how we'll return 0 if !IBS_CAPS_AVAIL because latter
doesn't happen practically with that flow.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists