Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1698905imu; Thu, 17 Jan 2019 01:39:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN5LVDfUcSAzHS2AZUqeATRklEqwds4Fylpt6zMVpB3Nr/s0So1zmf7Rfv/TjyIomtlKTd7z X-Received: by 2002:a17:902:2862:: with SMTP id e89mr14492604plb.158.1547717968156; Thu, 17 Jan 2019 01:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547717968; cv=none; d=google.com; s=arc-20160816; b=apf8B930/bMToyjTW1sFE+9/4JZl1V8t3kf7+txaLwJTy55sdx8TXKG/DJ6kb4qAoY u/oavq5t4gKRDZaVl2S5ZDcmEUtwiOoQgwGKL6h9NkeWtgoxMnvL07O+Wi0eNPFz8mdd gI2QJSgkZRNc6pn6jgqL0D0h6eQdygnkcBJKGtCngXoID4sREbCNIqbH3EUHoC66gACc O7K8PudICS5A4J4ho0Pa2y/Xti7KDFj44jsg7w62gf8IAaqJ86280DsyyTZU5PlA3YTh QWh4+53SMYr9LKQA84rvUoTX8DpkqFUmFwyF2TPKP4mTk54yUoj6d3D4BzvmRyrtZRYZ ONRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=eAQZv7n1nUktN3tlxwosRxhMI9TWhXqn4epYTY9BICg=; b=ikInTWipLwZB1azx3mI4L16lIXK7qIxtm705b5BpBVTRUf/F8D8u1rn2abkyP/sESt UhYLDH+QKYl3ZgfZWJb5/d390M2jCPdb1OfnLQVyd1vJ/SUkRL3gL2m06uZGx3YRN0TR oakjw7FBsI/viGb36xYkedPdVXOASbsVjX7c2rTu8IYRAAWfXbHz4e0ibWQS8Qqju6Or /7zuyAEHsktvmTRekn1DEgNSRg+BBkql9a5UY6kw8D2qGyTAG6sl4/dgi/eqLLnP0WwX 62BecWruGTX71uYDMHh4R/44xKK75xMb4y8le1tnfKK/N9SPlf3XnMXEpPIOcByhoIrF FoTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az11si1193433plb.386.2019.01.17.01.39.11; Thu, 17 Jan 2019 01:39:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730644AbfAQIUM (ORCPT + 99 others); Thu, 17 Jan 2019 03:20:12 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:33573 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728331AbfAQIUM (ORCPT ); Thu, 17 Jan 2019 03:20:12 -0500 Received: by mail-it1-f195.google.com with SMTP id m8so452257itk.0 for ; Thu, 17 Jan 2019 00:20:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eAQZv7n1nUktN3tlxwosRxhMI9TWhXqn4epYTY9BICg=; b=S3s1AXjh8VZ69d7ihWJ0JUvKY68aQZo3oa/1F/o8ZijS7xVIF4Le9GXOdfoRAAlkvi y02rSxDckfRKo8NPfdsuoIZxKn64Uy7SmkT7/NBgRpCAtKHehYiQ3QCqYUlOkInBeJxe PTEc6pB1/dP/8a0agDN4J3iJrA5bDdSJhVhik9TKyRefhH2PUssyhIuKfbT6t+4EndOV dUt4LzmBQs5+h4i3L7ryMKdcL1W+bG4zJUHoWbI43ZFRkXeNAA9LJRsWuPntB+klNlGI c6HS5dHE/lC/fxVL0jAbc2Lcn/zg8WZx91SfK+n/51GAnK08vzoUbFUBaBeS9aG3oLt5 iX1A== X-Gm-Message-State: AJcUukfPowHvMUVfqWEI076IgW2tg1nIE/r4Em5PH4fddozZbwd89gXu 5QC9UJXctT62YITDSmGmjMlKHOqd5M85M7+IsOGBZGcTGRqNhQ== X-Received: by 2002:a24:5fd2:: with SMTP id r201mr9035866itb.19.1547713211125; Thu, 17 Jan 2019 00:20:11 -0800 (PST) MIME-Version: 1.0 References: <20190115095834.22617-1-kasong@redhat.com> <20190115095834.22617-3-kasong@redhat.com> <20190115231005.GF6596@zn.tnic> <20190116094619.GB15409@zn.tnic> <20190117074959.GB31097@localhost.localdomain> In-Reply-To: <20190117074959.GB31097@localhost.localdomain> From: Kairui Song Date: Thu, 17 Jan 2019 16:20:00 +0800 Message-ID: Subject: Re: [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map To: Chao Fan Cc: Borislav Petkov , linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, Dave Young , Baoquan He , kexec@lists.infradead.org, akpm@linux-foundation.org, robert.moore@intel.com, erik.schmauss@intel.com, rafael.j.wysocki@intel.com, Len Brown Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 3:51 PM Chao Fan wrote: > > On Thu, Jan 17, 2019 at 03:41:13PM +0800, Kairui Song wrote: > >On Wed, Jan 16, 2019 at 5:46 PM Borislav Petkov wrote: > >> > >> On Wed, Jan 16, 2019 at 03:08:42PM +0800, Kairui Song wrote: > >> > I didn't see a way to reuse things in that patch series, situation is > >> > different, in that patch it needs to get RSDP in very early boot stage > >> > so it did everything from scratch, in this patch kexec_file_load need > >> > to get RSDP too, but everything is well setup so things are a lot > >> > easier, just read from current boot_prams, efi and fallback to > >> > acpi_find_root_pointer should be good. > >> > >> No no. Early code should find out that venerable RSDP thing once and > >> will save it somewhere for further use. No gazillion parsings of it. > >> Just once and share it with the rest of the code that needs it. > >> > > > >How about we refill the boot_params.acpi_rsdp_addr if it is not valid > >in early code, so it could be used as a reliable RSDP address source? > >That should make things easier. > > I think it's OK. > Try to read it, if get RSDP, use it. > If not, search in EFI/BIOS/... and refill the RSDP to > boot_params.acpi_rsdp_addr. > By the way, I search kernel code, I didn't find other code fill and > use it, only you(KEXEC) are trying to fill it. > If I miss something, please let me know. Yes, kexec would read RSDP again to pass it to second kernel, and only if EFI is disabled (efi=noruntime/old_map, else second kernel will get rsdp just fine). Not sure if any other component would use it. > > Thanks, > Chao Fan > -- Best Regards, Kairui Song