From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbbJBUee (ORCPT ); Fri, 2 Oct 2015 16:34:34 -0400 Received: from www.linutronix.de ([62.245.132.108]:43310 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbbJBUec (ORCPT ); Fri, 2 Oct 2015 16:34:32 -0400 Date: Fri, 2 Oct 2015 22:33:49 +0200 (CEST) From: Thomas Gleixner To: Andi Kleen cc: Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Fix thermal throttling reporting after kexec In-Reply-To: <20151001220457.GD26924@tassilo.jf.intel.com> Message-ID: References: <1443125443-24691-1-git-send-email-andi@firstfloor.org> <20151001172737.GC26924@tassilo.jf.intel.com> <20151001214959.GF12732@two.firstfloor.org> <20151001220457.GD26924@tassilo.jf.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Oct 2015, Andi Kleen wrote: > On Thu, Oct 01, 2015 at 11:50:00PM +0200, Andi Kleen wrote: > > > I see it under the correctness aspect. Mop up before you shut down. > > > > Ok. I suspect if you want to clean up all registers there's much more > > to do. > > > > BTW there's a small danger in it: if we ever crash accessing on > > of those registers panic may end up looping. > > I thought more about it. Since this is per logical CPU state > the cleanup cannot be done in a normal shutdown callback (which > only runs on one CPU), but needs some kind of global IPI/NMI. > > IPI could deadlock, so it would need to be NMI. > > KVM already has one, but would need to re-organize that into > first into a generic callback infrastructure. > > I don't think so much change is worth it for this one > somewhat dubious case. NMI code is also tricky and it's > probably better to keep the shut down paths as simple > and reliable as possible. Do you agree? Yes. Makes sense. Thanks for analysing it. tglx