From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614AbcAUTel (ORCPT ); Thu, 21 Jan 2016 14:34:41 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:34146 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbcAUTeh (ORCPT ); Thu, 21 Jan 2016 14:34:37 -0500 X-IBM-Helo: d23dlp03.au.ibm.com X-IBM-MailFrom: srikar@linux.vnet.ibm.com X-IBM-RcptTo: linux-efi@vger.kernel.org;linux-kernel@vger.kernel.org Date: Fri, 22 Jan 2016 01:03:32 +0530 From: Srikar Dronamraju To: Matt Fleming Cc: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Raghavendra K T , Dave Young , Linus Torvalds , Borislav Petkov Subject: Re: [PATCH] x86/efi: Setup separate EFI page tables in kexec paths Message-ID: <20160121193332.GA17206@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <1453385519-11477-1-git-send-email-matt@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1453385519-11477-1-git-send-email-matt@codeblueprint.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012119-0017-0000-0000-000002A1C547 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Matt Fleming [2016-01-21 14:11:59]: > The switch to using a new dedicated page table for EFI runtime calls > in commit commit 67a9108ed431 ("x86/efi: Build our own page table > structures") failed to take into account changes required for the > kexec code paths, which are unfortunately duplicated in the EFI code. > > Call the allocation and setup functions in kexec_enter_virtual_mode() > just like we do for __efi_enter_virtual_mode() to avoid hitting > NULL-pointer dereferences when making EFI runtime calls. > > At the very least, the call to efi_setup_page_tables() should have > existed for kexec before commit 67a9108ed431. Things just magically > worked because we were actually using the kernel's page tables that > contained the required mappings. > > Reported-by: Srikar Dronamraju > Cc: Raghavendra K T > Cc: Dave Young > Cc: Ingo Molnar > Cc: Linus Torvalds > Cc: Borislav Petkov > Signed-off-by: Matt Fleming Applied this patch on top of tip/x86/efi and was able to build and boot the kernel. -- Thanks and Regards Srikar Dronamraju