Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5979898imu; Mon, 21 Jan 2019 00:46:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN7j7EUJnjyuyyKS9xhlhh3lP4/41oUt7UMdC4tQlfGeUV0SXo97Y58sfsVuDIhsMGbv6wXO X-Received: by 2002:a62:6799:: with SMTP id t25mr28919397pfj.139.1548060389192; Mon, 21 Jan 2019 00:46:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548060389; cv=none; d=google.com; s=arc-20160816; b=wHa3m3aYJacpaCLScAisHkVVbIhZT1xore3jgdnlUdb+9/Lhprsclu53DJ7RI9g17K Ug4PAZjV7cATj1Ab41Xtvj8TiYFQPAKip6Q56VD/eEoBiBsda/cH/+KgV5FCV0vYMie+ dFF4HwrCdxZ6PA9JGnp6i5GJkzFphwqFtzFE/+KP876VCrY6aV/KF2He1x8ca9HFDFN6 3jQuLy1pgSzIxkK975IAVfuPMwGQTapTNS77Vi+oj73IMsu2RN4MXJ9Aeht63xadtUNM yQQCyA9JMsUg7UFMUBFoIbLEpHu5p4s26I6XSAD6Pau69G1yuKaPHGwD4orUgiagvJsw ynUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5Ex0G8obz0+6QiR5oZjGPNUTi8IyxY5Wn+oT0dlsk5E=; b=jeH0n3hjv4PDjxvpzBhJ5H+nq1ph1omFZ/NFsUHOGlbqW8TW8KnkyfPE1nzU2X61wS NB3h60xpCLQtd+pcW+RtPNj//3m6jeYZ/LSAckIv5LII/HaBxp7Oz4gy0oCeUCgJpgbn 5oY/lC/+0uyo4gsocqZqRz3AAeImGIm6lWVa+4xOmsZKCsURxrOFM2Xa1Z69iKI8YF3h Jr0q3kk6UGiELV1dkZmwj8Wl2yUMPX6L91LE10xmexg797xk2rvJa2U+WEmWAHPvE5YY tBd0PZuEc2ueFOrZ6zxqam1KEIkTQpm4eI8KuoRIo5ATAmb3lU972NK01ykglMWE6diz Ol/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j66si11824439pfb.182.2019.01.21.00.46.13; Mon, 21 Jan 2019 00:46:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729399AbfAUIpC (ORCPT + 99 others); Mon, 21 Jan 2019 03:45:02 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:20038 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727993AbfAUIpC (ORCPT ); Mon, 21 Jan 2019 03:45:02 -0500 X-IronPort-AV: E=Sophos;i="5.56,502,1539619200"; d="scan'208";a="52482817" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Jan 2019 16:44:59 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 973A04C47E9E; Mon, 21 Jan 2019 16:44:58 +0800 (CST) Received: from localhost.localdomain (10.167.225.56) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 21 Jan 2019 16:45:03 +0800 Date: Mon, 21 Jan 2019 16:43:52 +0800 From: Chao Fan To: Borislav Petkov CC: Kairui Song , , , , , , Dave Young , Baoquan He , , , , , , Len Brown Subject: Re: [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map Message-ID: <20190121084352.GA15754@localhost.localdomain> References: <20190115095834.22617-1-kasong@redhat.com> <20190115095834.22617-3-kasong@redhat.com> <20190115231005.GF6596@zn.tnic> <20190116094619.GB15409@zn.tnic> <20190118102636.GB622@zn.tnic> <20190121011830.GA1554@localhost.localdomain> <20190121082932.GA29166@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190121082932.GA29166@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: 973A04C47E9E.ABDEF X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: fanc.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 09:29:32AM +0100, Borislav Petkov wrote: >On Mon, Jan 21, 2019 at 09:18:30AM +0800, Chao Fan wrote: >> So I have changed as this method and put in my mail thread, you may not >> notice, so I put here for my function if I need to fill the >> boot_parameters: >> >> static inline acpi_physical_address get_boot_params_rsdp(void) >> { >> return boot_params->acpi_rsdp_addr; >> } > >Why do you need that silly wrapper? Will drop it. > >> static acpi_physical_address get_rsdp_addr(void) >> { >> bool boot_params_rsdp_exist; > >What's that bool supposed to do? Since I didn't see where Xen to fill the value, if boot_params->acpi_rsdp_addr is filled before my code, I just need to read it. If when I try to read it but not found, then parse RSDP and fill the RSDP address to boot_params->acpi_rsdp_addr. > >> acpi_physical_address pa; >> >> pa = get_acpi_rsdp(); >> >> if (!pa) >> pa = get_boot_params_rsdp(); >> >> if (!pa) { >> pa = efi_get_rsdp_addr(); >> boot_params_rsdp_exist = false; >> } >> else >> boot_params_rsdp_exist = true; >> >> if (!pa) >> pa = bios_get_rsdp_addr(); >> >> if (pa && !boot_params_rsdp_exist) >> boot_params.acpi_rsdp_addr = pa; >> >> return pa; >> } >> >> At the same time, I notice kernel only parses it when >> "#ifdef CONFIG_ACPI", we should keep sync with kernel, but I think >> we are parsing SRAT, CONFIG_ACPI is needed sure, so I am going to >> update the define of EARLY_SRAT_PARSE: >> >> config EARLY_SRAT_PARSE >> bool "EARLY SRAT parsing" >> def_bool y >> depends on RANDOMIZE_BASE && MEMORY_HOTREMOVE && ACPI > >Actually, you don't need that anymore - make it unconditionally >built-in. Because there are a bunch of users which need this and instead >of complicating this config option with a bunch of dependencies, we can >just as well have it always on. If I need to fill boot_params->acpi_rsdp_addr, I think we can make it unconditionally built-in. Thanks, Chao Fan > >Thx. > >-- >Regards/Gruss, > Boris. > >Good mailing practices for 400: avoid top-posting and trim the reply. > >