Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751783AbdLBGUk (ORCPT ); Sat, 2 Dec 2017 01:20:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:37190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbdLBGUR (ORCPT ); Sat, 2 Dec 2017 01:20:17 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 706952199E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org From: Andy Lutomirski To: X86 ML Cc: Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , Josh Poimboeuf , Andy Lutomirski Subject: [PATCH 1/2] Undo the split of setup_cpu_entry_area Date: Fri, 1 Dec 2017 22:20:10 -0800 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 43 This is obviously a hack. Either the patch should be adjusted back to the version I sent or trap_init should forcibly initialize all PMDs by something like __set_fixmap(..., __mkpte(0)); or however it's spelled. --- arch/x86/kernel/smpboot.c | 2 ++ arch/x86/kernel/traps.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 26317716559d..1325844b930a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1232,8 +1232,10 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) * The boot CPU area has been set up in trap_init() * already. */ + /* if (i) setup_cpu_entry_area(i); + */ } /* diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index ff4e6b595ae4..0ad92f35a75b 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -945,8 +945,12 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code) void __init trap_init(void) { + int cpu; /* Init cpu_entry_area before IST entries are set up */ - setup_cpu_entry_area(smp_processor_id()); + for_each_possible_cpu(cpu) { + pr_err("setup_cpu_entry_area(%d)\n", cpu); + setup_cpu_entry_area(cpu); + } idt_setup_traps(); -- 2.13.6