x86/apic: Use EILVT register count from APIC_EFEAT
A message that is not in the archive (sent off-list or not yet received): 20260930031309.GEarx-RcbEf8tHWUmg@fat_crate.local
[Restore CC list]
I messed up and dropped the Cc list in my reply to Boris, who noticed and promptly pointed it out. Restoring the CC list so that the below discussion is public.
Quoted 9 lines · Borislav Petkov
Quoted 3 lines · Naveen N Rao
No, I think that defeats the purpose of this patch. Part of the motivation for this patch is that we don't have to care if the EILVT register count changes again.
If you really think that for a new CPU, you won't have to touch the kernel, then you need to wake up and smell the coffee...
:-)
One can hope ;)
Quoted 11 lines
Quoted 11 lines
Note that the issue Sashiko is referring to requires three things:
- that HW advertise an inflated EILVT Register count inAPIC_EFEAT,
- that some other _new_ HW unit also advertises an offset > 175 for use (the two existing units: IBS and MCE, use a 4-bit field to encode the EILVT register number, so those can't trip this)
- and, that Linux stay in the old xAPIC mode (rather than x2APIC).If the first two are true, then that is hardware broken beyond help and it is hard to imagine Linux additionally being used in xAPIC mode.
Quoted 8 lines
Quoted 4 lines
This is certainly easier to trigger with virtualization, but there are far worse ways for the hypervisor to mess with the guest.
So, I don't think this alone is reason enough to clamp the value.
... but ok, you feel way stronger about this than me actually cares so sure, let's not do anything here. And yes, I kinda agree with some of your points too.
Thanks,
Naveen