From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbbCJNgp (ORCPT ); Tue, 10 Mar 2015 09:36:45 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:43280 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbbCJNgk (ORCPT ); Tue, 10 Mar 2015 09:36:40 -0400 Date: Tue, 10 Mar 2015 13:36:37 +0000 From: Matt Fleming To: Ingo Molnar Cc: Tapasweni Pathak , matt.fleming@intel.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov Subject: Re: [PATCH] efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction Message-ID: <20150310133637.GC17573@codeblueprint.co.uk> References: <20150303064850.GA30036@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150303064850.GA30036@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 03 Mar, at 07:48:50AM, Ingo Molnar wrote: > > Also clean up the save_pgd global variable while at it. > > untested as well. > > Thanks, > > Ingo > > ==============> > From 166625ceaef68fcbeee63adc63c02d75abcaf0db Mon Sep 17 00:00:00 2001 > From: Ingo Molnar > Date: Tue, 3 Mar 2015 07:42:48 +0100 > Subject: [PATCH] efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction > > Currently x86-64 efi_call_phys_prolog() saves into a global variable (save_pgd), > and efi_call_phys_epilog() restores the kernel pagetables from that global > variable. > > Change this to a cleaner save/restore pattern where the saving function returns > the saved object and the restore function restores that. > > Apply the same concept to the 32-bit code as well. > > Plus this approach, as an added bonus, allows us to express the > !efi_enabled(EFI_OLD_MEMMAP) situation in a clean fashion as well, > via a 'NULL' return value. > > Cc: Tapasweni Pathak > Signed-off-by: Ingo Molnar > --- > arch/x86/include/asm/efi.h | 6 ++++-- > arch/x86/platform/efi/efi.c | 5 +++-- > arch/x86/platform/efi/efi_32.c | 11 ++++++++--- > arch/x86/platform/efi/efi_64.c | 26 ++++++++++++++++---------- > 4 files changed, 31 insertions(+), 17 deletions(-) Applied, thanks! -- Matt Fleming, Intel Open Source Technology Center