From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755124AbbINKjy (ORCPT ); Mon, 14 Sep 2015 06:39:54 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:43610 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371AbbINKjx convert rfc822-to-8bit (ORCPT ); Mon, 14 Sep 2015 06:39:53 -0400 Message-Id: <55F6C01502000078000A2823@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Mon, 14 Sep 2015 04:39:49 -0600 From: "Jan Beulich" To: "Ard Biesheuvel" Cc: "Mark Rutland" , "Ian.Campbell@citrix.com" , "julien.grall@citrix.com" , "Stefano Stabellini" , "Shannon Zhao" , "leif.lindholm@linaro.org" , "shannon.zhao@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "xen-devel@lists.xen.org" , "Daniel Kiper" , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters References: <20150910112418.GC29293@leverpostej> <20150910121514.GE29293@leverpostej> <20150910144938.GI29293@leverpostej> <20150910162302.GN29293@leverpostej> <20150911124643.GB4530@olila.local.net-space.pl> <20150911154534.GD4530@olila.local.net-space.pl> <55F6886D.1090900@huawei.com> <55F693F5.8030203@huawei.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 14.09.15 at 11:36, wrote: > On 14 September 2015 at 11:31, Shannon Zhao wrote: >> My understanding is that if there are no EFI_MEMORY_RUNTIME regions, it >> means we can't use runtime services and should not set the bit >> EFI_RUNTIME_SERVICES of efi.flags. But if efi_virtmap_init() return >> true, the bit will be set. >> > > As I said, if you don't want the EFI_RUNTIME_SERVICES bit to be set > for other reasons, don't rig efi_virtmap_init() to return false when > it shouldn't. > >>> The absence of such regions is allowed by the spec, so >>> efi_virtmap_init() is correct imo to return success. >>> >> Sorry, not well know about the spec. Could you point out where the spec >> says this? >> > > Well, I think it doesn't work that way. You are claiming that a memory > map without at least one EFI_MEMORY_RUNTIME constitutes an error > condition, so the burden is on you to provide a reference to the spec > that says you must have at least one such region. Sure, from a spec pov you're right. But where would runtime services code/data live when there's not a single region marked as needing a runtime mapping. IOW while the spec doesn't say so, assuming no runtime services when there's not at least one executable region with the runtime flag set could serve as a stop gap measure against flawed firmware. Jan