Received: by 10.223.148.5 with SMTP id 5csp6767403wrq; Wed, 17 Jan 2018 18:48:31 -0800 (PST) X-Google-Smtp-Source: ACJfBouc5tX1DmS92cW5bLUrN5p9hncYsIZyoSHBhHZeckNcKiYRpz4oZmGGbIxp6Wrci4NUtdVf X-Received: by 10.98.217.28 with SMTP id s28mr31677091pfg.69.1516243711133; Wed, 17 Jan 2018 18:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516243711; cv=none; d=google.com; s=arc-20160816; b=ZkyMQf2tx8ljLUIoA5/ge1JjL9EA2DigdAj+SnLFL7TsmXoTrBE1+K2APIwwAsx4ey D3Tj8MU8x6KYJa/bScCC8eBh4WtUJ8o2uzJk3u8Of4IFTt3j0Q4gjBtcIwzvdBvj/ovb n7SAmdUlpynV8q72/qXackdV14mbET7O2qS9FLuyBMN6xKSdG72vVFy/jNwpNjJGs94R a58D6aH2hQB7QZrtvHX+rey8xm2psLllffpD2fnJK7emAsNuS36Vc3F75mjDzC0W1zUO +XFzvucim3f9sMeGuMnwHgBQq+G5+JcK8E4MBf9BtMvjRlsuY7g5rXvFHu0Ss9ohGJBj uLFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=tDP5I3Jx4RH85w9h1nJpKS+tnXJstXmx6/wP01KRje0=; b=a5tGtO/9OEID71uarPjMeWYxryrjIgI8JZbXJi1HrrQFf3OlrRzxdP94yb8KSaaiJ1 BqiAlQaX6g1I18TZrjF7cqXp1LeCPJhT6VV6s6JJvxZqU44ej/xjioDPAxCUWHnLl8gC x6a+LGniWnYIQ/iO4dAjTgKBB4uppJjkJQutvDoTD8/bf9xTlPtAXzMqmU3mF7IeU1MT tVf52v7bK/P0ueRvlwfnYjmskcBcksP75ghBcxqJ7vcOxHO8b/PWMCrZa4MKE6L3uA4p 2H0lCB0hSryeHKbwrwVB/jkWZdTJeEJ43QfbyM/3rlg43+XjdHcHYKmaBHh+Z0OI98Xj 6ghA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si5095854pga.371.2018.01.17.18.48.16; Wed, 17 Jan 2018 18:48:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752955AbeARCrw (ORCPT + 99 others); Wed, 17 Jan 2018 21:47:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59430 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbeARCrv (ORCPT ); Wed, 17 Jan 2018 21:47:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 184CE83F3F; Thu, 18 Jan 2018 02:47:51 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-17.pek2.redhat.com [10.72.12.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13BB060BE9; Thu, 18 Jan 2018 02:47:44 +0000 (UTC) Date: Thu, 18 Jan 2018 10:47:41 +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: <20180118024741.GA1831@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) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 18 Jan 2018 02:47:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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? Did several quick tests, probably need more tests, but till now the results are: void stop_this_cpu(void *dummy) { =====> add wbinvd here: kexec works local_irq_disable(); =====> add wbinvd here: kexec works /* * Remove this CPU: */ set_cpu_online(smp_processor_id(), false); =====> add wbinvd here: kexec does not work disable_local_APIC(); mcheck_cpu_clear(this_cpu_ptr(&cpu_info)); [snip] So it seems that it will not work after cpu offined.. > > 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