Re: [PATCH] x86/thermal: Fix LVT thermal setup for SMI delivery mode

From: Thomas Gleixner
Date: Thu May 27 2021 - 07:49:48 EST


On Thu, May 27 2021 at 12:31, Borislav Petkov wrote:
> @@ -1226,6 +1227,14 @@ void __init setup_arch(char **cmdline_p)
>
> x86_init.timers.wallclock_init();
>
> + /*
> + * This needs to run before setup_local_APIC() which soft-disables the
> + * local APIC temporarily and that masks the thermal LVT interrupt,
> + * leading to softlockups on machines which have configured SMI
> + * interrupt delivery.
> + */
> + therm_lvt_init();

That works, but TBH, it's a hack....

What I really fail to understand is how disabling that LVT entry makes
the machine lock up.

Also if disabling this entry is causing the BIOS/SMM gunk to go south, then
disabling CONFIG_X86_THERMAL_VECTOR should have the same effect.

Which made me look at other places like lapic_suspend/resume which does
the save/restore Kconfig conditional as well.

Thanks,

tglx