From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH] x86/thermal: Fix LVT thermal setup for SMI delivery mode Date: Thu, 27 May 2021 13:49:42 +0200 Message-ID: <87h7io8kh5.ffs@nanos.tec.linutronix.de> References: <373464e3-b8a0-0fe0-b890-41df0eecf090@nurealm.net> <1f6c70f4-6680-d6ea-465a-548dc7698317@nurealm.net> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1622116183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KpJO8/wUONUzp+lF25GXIlQ0ASXxx+GAXWN69tVWybM=; b=luSN3hdXA90fnIwYe7NygmIBDq9maKK/qrasbv8wHHA5XtNPKkZtE/AQalBVLJ52L9XBKW XwjBkHd6nuCkrKdQ4tVJ6DggzAkQtFt0eDTJjZCXEHap1GjFIrsTXcMPVniTgUALV3FPxG 2w4uarEfDk6diyXvdyUJb7SBWSuQigNEfLsmEl7kPgsH/gKQLB7mtfEeo70E2B2CPfIIVE jGj2lWJMFhapo20dLtLULSamX+NTLZJYbfKuwyWbJFG7PfSJNx2SgljCRJj6fQH6Ldi806 xrzBfHF+dqzXkufsY28zBnh9TIgYjaN4igXiIOhLDcNgsxtqggeVshvvsd+9hw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1622116183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KpJO8/wUONUzp+lF25GXIlQ0ASXxx+GAXWN69tVWybM=; b=6lIJmAPeNZzRVa7qPhy+UsX4TXKyKEUoXs1xxXMM3hjbDoHKXPA5ugrTGWG+WKhp1VezHc juA0Ssr9VxsIO8CQ== In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Borislav Petkov , James Feeney Cc: linux-smp@vger.kernel.org, Jens Axboe , lkml , Zhang Rui , Srinivas Pandruvada , x86-ml 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