From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: [BUG] x86/efi: MMRs no longer properly mapped after switch to isolated page table Date: Mon, 9 May 2016 22:55:24 +0100 Message-ID: <20160509215524.GQ2839@codeblueprint.co.uk> References: <20160427154132.GB113599@stormcage.americas.sgi.com> <20160427225122.GG21282@pd.tnic> <20160428014128.GF113599@stormcage.americas.sgi.com> <20160428125711.GB9164@pd.tnic> <20160429154119.GI113599@stormcage.americas.sgi.com> <20160430221209.GO2839@codeblueprint.co.uk> <20160502213931.GT113599@stormcage.americas.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160502213931.GT113599-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alex Thorlton Cc: Borislav Petkov , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Russ Anderson , Dimitri Sivanich , mike travis , Nathan Zimmer List-Id: linux-efi@vger.kernel.org On Mon, 02 May, at 04:39:31PM, Alex Thorlton wrote: > > If you think we're violating EFI rules by accessing these registers from > both sides of the fence, please let me know. I'd like to make sure that > we get everything behaving the way it should be! Oh no, I don't think this is violating the UEFI spec at all, but I do think it goes against the spirit of the way other implementations are designed; with maximum separation between firmware and kernel. In a perfect world, I'd suggest mapping the MMR range in both the kernel and firmware, at different virtual address ranges, but have the firmware's version opaque to the kernel and only described by an EfiMemoryMappedIO region, or something. That is ignoring any region type conflicts that may arise. Of course, we don't operate in a perfect world, so a good solution may be to just insert the kernels' mapping into the EFI page tables.