From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752660AbbI3BEY (ORCPT ); Tue, 29 Sep 2015 21:04:24 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49815 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbbI3BEV (ORCPT ); Tue, 29 Sep 2015 21:04:21 -0400 Subject: Re: [PATCH 2/2] arm64/efi: Don't pad between EFI_MEMORY_RUNTIME regions To: Ingo Molnar , Ard Biesheuvel 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> <20150927070644.GC26125@gmail.com> Cc: Matt Fleming , Thomas Gleixner , "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 From: "H. Peter Anvin" Message-ID: <560B34EF.8040408@zytor.com> Date: Tue, 29 Sep 2015 18:03:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150927070644.GC26125@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/27/2015 12:06 AM, Ingo Molnar wrote: > > * 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. > Pro: by far the sanest way to map the UEFI tables. Con: doesn't actually work (breaks on several known platforms.) -hpa