lkml.org 
[lkml]   [2019]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/cacheinfo: fix a -Wtype-limits warning
On Wed, Jun 19, 2019 at 07:01:27PM +0200, Borislav Petkov wrote:
> On Wed, Jun 05, 2019 at 01:07:04PM -0700, Sean Christopherson wrote:
> > Might be worth calling out in the changelog that 'c->x86 == 0x17' is true
> > if and only if c->x86_model was explicitly set by cpu_detect(), i.e. the
> > patch is correct even if the original intent was a misguided attempt to
> > check that x86_model has been set.
>
> Are you thinking about some sick virt scenario where base CPUID level is < 1?

Ha, no. My comment was that it'd be worth explaining that the original
'c->x86_model >= 0' check was completely bogus, even if the intent was
something like 'c->x86_model != 0'.

> In this particular case, there's a guard at the beginning of
> cacheinfo_amd_init_llc_id():
>
> if (!cpuid_edx(0x80000006))
> return;
>
> but if there's CPUs which have CPUID 0x80000006 but base CPUID level is
> < 1, then that's their problem.
>
> --
> Regards/Gruss,
> Boris.
>
> Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2019-06-19 19:13    [W:0.039 / U:42.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site