Re: [PATCH] x86/microcode: Fix crashes on early 486 CPUs due to usage of 'cpuid'.

From: H. Peter Anvin
Date: Mon Apr 07 2025 - 10:43:49 EST


On April 7, 2025 3:29:27 AM PDT, Borislav Petkov <bp@xxxxxxxxx> wrote:
>On Mon, Apr 07, 2025 at 09:58:48AM +1000, Kevin Koster wrote:
>> But I like to know Linux really works on the hardware it's built for,
>
>I don't know what that means.
>
>> and I'm not much better, writing this now on a Pentium 1.
>
>Lemme guess: this is your main machine you use for daily work?
>
>:-\
>
>> > - if (dis_ucode_ldr || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
>> > + if (microcode_loader_disabled() || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
>> return 0;
>>
>> Still fails unless the native_cpuid_eax(1) call is moved under here. After that
>> change, it boots fine.
>
>Please show me with a diff what you're doing because I don't know what you
>mean.
>
>I did this:
>
>bool have_cpuid_p(void)
>{
> return false;
>}
>
>in order to simulate no CPUID support but my 32-bit guest boots fine.
>
>Also, send a full dmesg from that machine so that I can try to reproduce here.
>
>Thx.
>

Well, Linus' original box was a 386 (SX, I think?) so that ship sailed already.