From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754863AbbI0HGv (ORCPT ); Sun, 27 Sep 2015 03:06:51 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:35279 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751925AbbI0HGt (ORCPT ); Sun, 27 Sep 2015 03:06:49 -0400 Date: Sun, 27 Sep 2015 09:06:44 +0200 From: Ingo Molnar To: Ard Biesheuvel Cc: Matt Fleming , Thomas Gleixner , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , Leif Lindholm , Catalin Marinas , Will Deacon , "stable@vger.kernel.org" , Matt Fleming , Mark Rutland , Mark Salter , Linus Torvalds , Andrew Morton , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , Brian Gerst Subject: Re: [PATCH 2/2] arm64/efi: Don't pad between EFI_MEMORY_RUNTIME regions Message-ID: <20150927070644.GC26125@gmail.com> References: <1443218539-7610-1-git-send-email-matt@codeblueprint.co.uk> <1443218539-7610-3-git-send-email-matt@codeblueprint.co.uk> <20150926060159.GB25877@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ard Biesheuvel wrote: > > If we allocate the EFI runtime as a single virtual memory block then issues > > like rounding between sections does not even come up as a problem: we map the > > original offsets and sizes byte by byte. > > Well, by that reasoning, we should not call SetVirtualAddressMap() in the first > place, and just use the 1:1 mapping UEFI uses natively. This is more than > feasible on arm64, and I actually fought hard against using > SetVirtualAddressMap() at all, but I was overruled by others. I think this is > also trivially possible on X64, since the 1:1 mapping is already active > alongside the VA mapping. Could we please re-list all the arguments pro and contra of 1:1 physical mappings, in a post that also explains the background so that more people can chime in, not just people versed in EFI internals? It's very much possible that a bad decision was made. Thanks, Ingo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 2/2] arm64/efi: Don't pad between EFI_MEMORY_RUNTIME regions Date: Sun, 27 Sep 2015 09:06:44 +0200 Message-ID: <20150927070644.GC26125@gmail.com> References: <1443218539-7610-1-git-send-email-matt@codeblueprint.co.uk> <1443218539-7610-3-git-send-email-matt@codeblueprint.co.uk> <20150926060159.GB25877@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ard Biesheuvel Cc: Matt Fleming , Thomas Gleixner , "H. Peter Anvin" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Leif Lindholm , Catalin Marinas , Will Deacon , "stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Matt Fleming , Mark Rutland , Mark Salter , Linus Torvalds , Andrew Morton , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , Brian Gerst List-Id: linux-efi@vger.kernel.org * Ard Biesheuvel wrote: > > If we allocate the EFI runtime as a single virtual memory block then issues > > like rounding between sections does not even come up as a problem: we map the > > original offsets and sizes byte by byte. > > Well, by that reasoning, we should not call SetVirtualAddressMap() in the first > place, and just use the 1:1 mapping UEFI uses natively. This is more than > feasible on arm64, and I actually fought hard against using > SetVirtualAddressMap() at all, but I was overruled by others. I think this is > also trivially possible on X64, since the 1:1 mapping is already active > alongside the VA mapping. Could we please re-list all the arguments pro and contra of 1:1 physical mappings, in a post that also explains the background so that more people can chime in, not just people versed in EFI internals? It's very much possible that a bad decision was made. Thanks, Ingo