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

Borislav Petkov <[email protected]> Thu, 27 May 2021 21:01:35 +0200
Newsgroups org.kernel.vger.linux-smp,org.kernel.vger.linux-kernel
Message-ID <YK/sjypdlYbk/[email protected]>
On Thu, May 27, 2021 at 11:09:59AM -0700, Srinivas Pandruvada wrote:
> My guess is that system is booting hot sometimes. SMM started fan or
> some cooling and set a temperature threshold. It is waiting for thermal
> interrupt for temperature threshold, which it never got.

Are you saying that that replication of lvtthmr_init to the APs in
intel_init_thermal() is absolutely needed on those SMI machines running
hot?

That thing:

         * If BIOS takes over the thermal interrupt and sets its interrupt
         * delivery mode to SMI (not fixed), it restores the value that the
         * BIOS has programmed on AP based on BSP's info we saved since BIOS
         * is always setting the same value for all threads/cores.

?

Me moving that lvtthmr_init read later would replicate the wrong value
because we'd soft-disable the APIC and thus the core would lockup
waiting...

The other interesting thing is that the core would always lockup when
trying to IPI another core to remote-flush the TLBs.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette