From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbcEAOhF (ORCPT ); Sun, 1 May 2016 10:37:05 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36297 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbcEAOhD (ORCPT ); Sun, 1 May 2016 10:37:03 -0400 Subject: Re: efi_enabled(EFI_PARAVIRT) use To: Matt Fleming References: <20160429142020.4499e185@canb.auug.org.au> <20160429063936.GA28320@gmail.com> <20160429143931.GG2839@codeblueprint.co.uk> <5724BDD2.5020600@linaro.org> <20160430204420.GM2839@codeblueprint.co.uk> <572576E2.7060508@linaro.org> <20160501132620.GT2839@codeblueprint.co.uk> Cc: Ard Biesheuvel , Stefano Stabellini , Ingo Molnar , Stephen Rothwell , "Luis R. Rodriguez" , Jeremy Fitzhardinge , Konrad Rzeszutek Wilk , Stefano Stabellini , Xen Devel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , linux-next@vger.kernel.org, "linux-kernel@vger.kernel.org" , Borislav Petkov From: Shannon Zhao Message-ID: <57261483.10500@linaro.org> Date: Sun, 1 May 2016 22:36:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160501132620.GT2839@codeblueprint.co.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年05月01日 21:26, Matt Fleming wrote: > On Sun, 01 May, at 11:24:18AM, Shannon Zhao wrote: >> Because the UEFI params for Dom0 are located under /hypervisor/uefi node >> instead of /chosen. So it needs to check whether it's a Dom0 then search >> and parse different node with different params arrays. > > Why can't you search both nodes? Before searching, it needs to decide which uefi params array should be passed to of_scan_flat_dt(). > Would you ever expect to see both for > a Dom0 kernel? > >> So it still needs add another check to firstly parse the fdt to see if >> there is "xen,uefi-system-table" under /hypervisor/uefi node, right? I >> think it's a bit redundant compared with xen_initial_domain(). > > Sometimes you really do need to check xen_initial_domain(), but I do > not think this is such a case. And if we can get by without adding > that check, the code will be better for it. > So is there any other way you suggest? Thanks, -- Shannon