Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbcEADY2 (ORCPT ); Sat, 30 Apr 2016 23:24:28 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34567 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbcEADY1 (ORCPT ); Sat, 30 Apr 2016 23:24:27 -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> 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: <572576E2.7060508@linaro.org> Date: Sun, 1 May 2016 11:24:18 +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: <20160430204420.GM2839@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 Content-Length: 1294 Lines: 29 On 2016年05月01日 04:44, Matt Fleming wrote: >> While I still have a question, in this patch we use >> > efi_enabled(EFI_PARAVIRT) as a condition to make fdt_find_uefi_params() >> > and efi_get_fdt_params() execute different ways. So it needs to find a >> > new condition for that if we need to get rid of EFI_PARAVIRT. One I >> > think is that xen_initial_domain() check. Is that fine? > Hmm... why do you actually need to check whether you're running on a > PV machine in fdt_find_uefi_params()? 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. > Can't you infer that from the DT > params you discover? > > I could understand maybe only accepting the "xen,uefi-system-table" > property if IS_ENABLED(CONFIG_XEN) but surely you don't also need to > filter based on whether you're booting a PV kernel? > > Let me put it this way: when would you see "xen,uefi-system-table" and > *not* be booting a PV 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(). Thanks, -- Shannon