From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193AbdJIMnB (ORCPT ); Mon, 9 Oct 2017 08:43:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbdJIMnA (ORCPT ); Mon, 9 Oct 2017 08:43:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A07AD218DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Mon, 9 Oct 2017 08:42:57 -0400 From: Steven Rostedt To: tip-bot for Andy Lutomirski Cc: luto@kernel.org, rostedt@goodmis.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, bp@alien8.de, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/urgent] x86/mm/64: Fix reboot interaction with CR4.PCIDE Message-ID: <20171009084257.0a8ac06c@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Oct 2017 04:36:01 -0700 tip-bot for Andy Lutomirski wrote: > Commit-ID: 924c6b900cfdf376b07bccfd80e62b21914f8a5a > Gitweb: https://git.kernel.org/tip/924c6b900cfdf376b07bccfd80e62b21914f8a5a > Author: Andy Lutomirski > AuthorDate: Sun, 8 Oct 2017 21:53:05 -0700 > Committer: Thomas Gleixner > CommitDate: Mon, 9 Oct 2017 13:31:04 +0200 > > x86/mm/64: Fix reboot interaction with CR4.PCIDE > > Trying to reboot via real mode fails with PCID on: long mode cannot > be exited while CR4.PCIDE is set. (No, I have no idea why, but the > SDM and actual CPUs are in agreement here.) The result is a GPF and > a hang instead of a reboot. > > I didn't catch this in testing because neither my computer nor my VM > reboots this way. I can trigger it with reboot=bios, though. > > Fixes: 660da7c9228f ("x86/mm: Enable CR4.PCIDE on supported systems") > Reported-and-tested-by: Steven Rostedt (VMware) Didn't someone somewhere say not to combine tags? Have them always be separate. I noticed they were separate when Andy submitted it, but I'm assuming that Thomas combined it. -- Steve > Signed-off-by: Andy Lutomirski > Signed-off-by: Thomas Gleixner > Cc: Borislav Petkov > Link: https://lkml.kernel.org/r/f1e7d965998018450a7a70c2823873686a8b21c0.1507524746.git.luto@kernel.org > > --- > arch/x86/kernel/reboot.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c > index 54180fa..add33f6 100644 > --- a/arch/x86/kernel/reboot.c > +++ b/arch/x86/kernel/reboot.c > @@ -105,6 +105,10 @@ void __noreturn machine_real_restart(unsigned int type) > load_cr3(initial_page_table); > #else > write_cr3(real_mode_header->trampoline_pgd); > + > + /* Exiting long mode will fail if CR4.PCIDE is set. */ > + if (static_cpu_has(X86_FEATURE_PCID)) > + cr4_clear_bits(X86_CR4_PCIDE); > #endif > > /* Jump to the identity-mapped low memory code */