Messages in this thread | ![/](/images/icornerl.gif) | | From | "Luck, Tony" <> | Subject | RE: [PATCH v3] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL | Date | Fri, 17 May 2024 17:43:10 +0000 |
| |
> > for (m = match; > > - m->vendor | m->family | m->model | m->steppings | m->feature; > > + m->vendor | m->family | m->model | m->steppings | m->feature | m->flags; > > I think this should not do anything implicit even if it is correct but > should explicitly check > > if (!(m->flags & X86_CPU_ID_FLAG_VENDOR_VALID)) > continue; > > I don't have a clear idea how exactly yet - I need to play with it. > > Maybe this stupid flow in the loop should be finally fixed into > something more readable and sensible...
What if the bit in flags was named " X86_CPU_ID_FLAG_ENTRY_VALID"
Then the loop in x86_match_cpu() could just be:
for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {
... }
-Tony
| ![\](/images/icornerr.gif) |