From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753098AbcEIVz3 (ORCPT ); Mon, 9 May 2016 17:55:29 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38485 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbcEIVz1 (ORCPT ); Mon, 9 May 2016 17:55:27 -0400 Date: Mon, 9 May 2016 22:55:24 +0100 From: Matt Fleming To: Alex Thorlton Cc: Borislav Petkov , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-efi@vger.kernel.org, Russ Anderson , Dimitri Sivanich , mike travis , Nathan Zimmer Subject: Re: [BUG] x86/efi: MMRs no longer properly mapped after switch to isolated page table 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 Content-Disposition: inline In-Reply-To: <20160502213931.GT113599@stormcage.americas.sgi.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.