From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbeARC3X (ORCPT ); Wed, 17 Jan 2018 21:29:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54134 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbeARC3W (ORCPT ); Wed, 17 Jan 2018 21:29:22 -0500 Date: Thu, 18 Jan 2018 10:29:05 +0800 From: Dave Young To: Linus Torvalds Cc: Yu Chen , Thomas Gleixner , Juergen Gross , Tony Luck , Boris Ostrovsky , Borislav Petkov , Rui Zhang , Arjan van de Ven , Dan Williams , Ingo Molnar , Kexec Mailing List , Linux Kernel Mailing List , ebiederm@redhat.com, Tom Lendacky , Baoquan He Subject: Re: kexec reboot fails with extra wbinvd introduced for AME SME Message-ID: <20180118022905.GA2933@dhcp-128-65.nay.redhat.com> References: <20171213025256.GA1913@dhcp-128-65.nay.redhat.com> <20171213155746.GA29572@yu-chen.sh.intel.com> <20171214092429.GA2004@dhcp-128-65.nay.redhat.com> <20180104031537.GA1819@dhcp-128-65.nay.redhat.com> <20180117072123.GA1866@dhcp-128-65.nay.redhat.com> <20180118014705.GA1812@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/17/18 at 06:14pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > > > It does not work with just once wbinvd(), and it only works with > > removing the wbinvd() for me. Tom's new post works for me as well > > since my cpu is an Intel i5-4200U. > > Intriguing. > > It's not like the wbinvd really should be that much of a deal. > > I think Tom's patch is fine and should be applied, but it does worry > me a bit that even a single wbinvd makes that much of a difference for > you. There is very little logical reason I can think of that a wbinvd > should make any difference what-so-ever on an i5-4200U. > > I wonder if you have some system issues, and wbinvd just happens to > trigger them. But I think we do wbinvd before a suspend-to-RAM too > (it's "ACPI_FLUSH_CPU_CACHE()" in the ACPI code). And the dmr code > dioes "wbinvd_on_all_cpus()" which does a cross-call etc. > > Would you mind experimenting a bit with that wbinvd? > > In particular, what happens if you enable it (so it's not hidden by > the SME check), but you move it up to before interrupts are disabled? Will play with it more. Actually I found the hang seems happens in code of arch/x86/kernel/relocate_kernel_64.S, there is another wbinvd there as well. > > I'm wondering if there is some issue with MCE generation and wbinvd > and whatever, and doing it when the CPU is down and interrupts are > disabled causes some system issue.. > > Does anybody have any other ideas? > > Linus