From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755589AbbINJeS (ORCPT ); Mon, 14 Sep 2015 05:34:18 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:1768 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754004AbbINJdz (ORCPT ); Mon, 14 Sep 2015 05:33:55 -0400 Message-ID: <55F693F5.8030203@huawei.com> Date: Mon, 14 Sep 2015 17:31:33 +0800 From: Shannon Zhao User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Ard Biesheuvel CC: Daniel Kiper , Stefano Stabellini , Mark Rutland , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-efi@vger.kernel.org" , "Ian.Campbell@citrix.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "leif.lindholm@linaro.org" , "xen-devel@lists.xen.org" , "julien.grall@citrix.com" , "freebsd-arm@freebsd.org" , "matt.fleming@intel.com" , "christoffer.dall@linaro.org" , "jbeulich@suse.com" , "peter.huangpeng@huawei.com" , "shannon.zhao@linaro.org" , Konrad Rzeszutek Wilk Subject: Re: [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> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/9/14 17:09, Ard Biesheuvel wrote: > On 14 September 2015 at 10:42, Shannon Zhao wrote: > [..] > >> >> It only needs to apply following patch to fix a bug in Linux kernel when >> mapping EFI_MEMORY_RUNTIME memory. >> > > Could you explain why you think efi_virtmap_init() should fail if > there are no EFI_MEMORY_RUNTIME regions? > 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. > 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? > If you are trying to work around the issue where Xen does not expose > any Runtime Services regions, there is simply no way to do that and be > still UEFI compliant. I have suggested before that we should perhaps > tolerate this anyway, by considering the case where the EFI System > Table has a NULL runtime services pointer. But rigging > efi_virtmap_init() like this is really not the way to achieve that. > -- Shannon From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shannon Zhao Subject: Re: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters Date: Mon, 14 Sep 2015 17:31:33 +0800 Message-ID: <55F693F5.8030203@huawei.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ard Biesheuvel Cc: Mark Rutland , "devicetree@vger.kernel.org" , "linux-efi@vger.kernel.org" , "Ian.Campbell@citrix.com" , Stefano Stabellini , Daniel Kiper , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "leif.lindholm@linaro.org" , "xen-devel@lists.xen.org" , "julien.grall@citrix.com" , "freebsd-arm@freebsd.org" , "matt.fleming@intel.com" , "christoffer.dall@linaro.org" , "jbeulich@suse.com" , "peter.huangpeng@huawei.com" , linux-arm-kernel@lists.infradead List-Id: linux-efi@vger.kernel.org On 2015/9/14 17:09, Ard Biesheuvel wrote: > On 14 September 2015 at 10:42, Shannon Zhao wrote: > [..] > >> >> It only needs to apply following patch to fix a bug in Linux kernel when >> mapping EFI_MEMORY_RUNTIME memory. >> > > Could you explain why you think efi_virtmap_init() should fail if > there are no EFI_MEMORY_RUNTIME regions? > 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. > 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? > If you are trying to work around the issue where Xen does not expose > any Runtime Services regions, there is simply no way to do that and be > still UEFI compliant. I have suggested before that we should perhaps > tolerate this anyway, by considering the case where the EFI System > Table has a NULL runtime services pointer. But rigging > efi_virtmap_init() like this is really not the way to achieve that. > -- Shannon From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhaoshenglong@huawei.com (Shannon Zhao) Date: Mon, 14 Sep 2015 17:31:33 +0800 Subject: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters In-Reply-To: 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> Message-ID: <55F693F5.8030203@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2015/9/14 17:09, Ard Biesheuvel wrote: > On 14 September 2015 at 10:42, Shannon Zhao wrote: > [..] > >> >> It only needs to apply following patch to fix a bug in Linux kernel when >> mapping EFI_MEMORY_RUNTIME memory. >> > > Could you explain why you think efi_virtmap_init() should fail if > there are no EFI_MEMORY_RUNTIME regions? > 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. > 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? > If you are trying to work around the issue where Xen does not expose > any Runtime Services regions, there is simply no way to do that and be > still UEFI compliant. I have suggested before that we should perhaps > tolerate this anyway, by considering the case where the EFI System > Table has a NULL runtime services pointer. But rigging > efi_virtmap_init() like this is really not the way to achieve that. > -- Shannon