Re: [PATCH RFC] x86/cpu: fix intermittent lockup on poweroff
From: Dave Hansen
Date: Tue Apr 25 2023 - 16:03:39 EST
On 4/25/23 12:26, Tony Battersby wrote:
> - if (cpuid_eax(0x8000001f) & BIT(0))
> + if (c->extended_cpuid_level >= 0x8000001f &&
> + (cpuid_eax(0x8000001f) & BIT(0)))
> native_wbinvd();
Oh, so the existing code is running into the
> If a value entered for CPUID.EAX is higher than the maximum input
> value for basic or extended function for that processor then the data
> for the highest basic information leaf is returned
behavior. It's basically looking at BIT(0) of some random extended
leaf. Probably 0x80000008 based on your 'cpuid -r' output.