From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752191AbcELCWd (ORCPT ); Wed, 11 May 2016 22:22:33 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:11005 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751552AbcELCWb (ORCPT ); Wed, 11 May 2016 22:22:31 -0400 Message-ID: <5733E8CF.3070004@huawei.com> Date: Thu, 12 May 2016 10:22:07 +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: Matt Fleming , Shannon Zhao CC: , , , , , , , , , , , Subject: Re: [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI References: <1462523526-3172-1-git-send-email-zhaoshenglong@huawei.com> <20160511122730.GU2839@codeblueprint.co.uk> <57333533.2030206@linaro.org> <20160511232444.GY2839@codeblueprint.co.uk> In-Reply-To: <20160511232444.GY2839@codeblueprint.co.uk> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.5733E8DB.007B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f367542fed3fb4dd21527b68904e63f2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/5/12 7:24, Matt Fleming wrote: > On Wed, 11 May, at 09:35:47PM, Shannon Zhao wrote: >>> > > >>> > > Also, why do you need to setup efi.runtime_version here? Isn't that >>> > > done inside uefi_init()? >>> > > >> > I don't see any codes which setup efi.runtime_version in uefi_init(). > > Look in the EFI tree, > > https://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git/tree/drivers/firmware/efi/arm-init.c?h=next#n120 > Ah, there are some patches in EFI tree introducing this change, but they are not in kernel matser but I didn't notice this, sorry. >>> > > Here is how I would have expected this patch to look: >>> > > >>> > > - Add FDT code to find hypervisor EFI params >>> > > >>> > > - Force enable EFI_RUNTIME_SERVICES for Xen and call >>> > > xen_efi_runtime_setup() inside xen_guest_init() >>> > > >>> > > - Change arm_enable_runtime_services() to handle the case where >>> > > EFI_RUNTIME_SERVICES is already set >>> > > >>> > > Am I misunderstanding some ordering issues? >> > >> > Since xen_guest_init() and arm_enable_runtime_services() are both >> > early_initcall and the calling order is random I think. > Urgh, right, I missed that. > >> > And when we call xen_efi_runtime_setup() and setup >> > efi.runtime_version in xen_guest_init(), the efi.systab might be >> > NULL. So it needs to map the systanle explicitly before we use >> > efi.systab. > Could you explain why you need to copy efi.runtime_version instead of > letting the existing code in uefi_init() set it up? > > Also, efi.systab isn't used by xen_efi_runtime_setup() as far I can > see, not sure why you need that either? As said above, I will rebase this patch on top of the EFI next branch. Thanks, -- Shannon