Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1862380yba; Thu, 4 Apr 2019 21:21:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuB1+9lPUbwA7mLCk9rvkud4y8siE/LT/r3/Y/sLwSRs8SuPloqRX4C9OzjVyOL74eZEqn X-Received: by 2002:a65:63d7:: with SMTP id n23mr9576956pgv.26.1554438089995; Thu, 04 Apr 2019 21:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554438089; cv=none; d=google.com; s=arc-20160816; b=j49IdI946vsM6h/JLV4YA0g/xq12BVBxeL3/Xz6aGYlYg1vUf5oYbOn35HWw31yFOm RS86/D7vRu8eRtNKUM4HCG/EnCVHaZ+TPqqIoX8kJ/oiBygJV2KDWU1kL11mtiUiXUr5 FgLlrSaRgICGqEZEziHhZ1VbMC4hU5w/wdoKEcM24LmQt0Zu3ZcqfwVZNH7BASs0yA8W jmIXK+sJEQct/UvCPxJsdJHfZ21/Qitl6do+wkWkVDL9No/0UajPRHvTS16FZhNwp9WB ewLT3NVIv47JbNaK4i7JYe3uLRsOAhL1XmjJJ7/k8TksPikB1xCj7ZBlUk5odP1mDyT/ vieQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=KGbFMyZ98rx6+re6U5QWhTTGApR0RRYDGjJ71uLsN/w=; b=Jn7qoQQYOmhyxMta+tadGkRX3+8plGGce3EDHIF4wIDD/uAV08hp5UlE5VTa7qyua5 Ue6pwojEBnAL58eU6H+j3F8zwerQOOfEVfNzoiWgViBwD+zScjxpQ7ACuRt6PtQn4zv4 tbpTz1ZIoxEjC+rwQrOR9nHgAtUWnRd3KUsZT0BU1BGO6LtIeA4YsbHb2+brR+VFBYf2 1NraOQ0reCW5ST0ueWrGpFS/CfhMd7yB6Eb5ck851Ile23/ip9bAGp0aP5qs7NZk1Ave E6s/zYKLWh29clkvmkJwxooq/M2Mwyzr4sqkl296OepSitaH63+u1KxfPFAK/37a0zS3 4iNQ== 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 16si18068999pfr.26.2019.04.04.21.21.11; Thu, 04 Apr 2019 21:21:29 -0700 (PDT) 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 S1726326AbfDEEUc convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Apr 2019 00:20:32 -0400 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:55201 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfDEEUc (ORCPT ); Fri, 5 Apr 2019 00:20:32 -0400 Received: from mailgate02.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id x354K9gA029556 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Apr 2019 13:20:09 +0900 Received: from mailsv01.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate02.nec.co.jp (8.15.1/8.15.1) with ESMTP id x354K8nt004149; Fri, 5 Apr 2019 13:20:09 +0900 Received: from mail01b.kamome.nec.co.jp (mail01b.kamome.nec.co.jp [10.25.43.2]) by mailsv01.nec.co.jp (8.15.1/8.15.1) with ESMTP id x354JrIL002608; Fri, 5 Apr 2019 13:20:08 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.138] [10.38.151.138]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-4012596; Fri, 5 Apr 2019 13:19:52 +0900 Received: from BPXM12GP.gisp.nec.co.jp ([10.38.151.204]) by BPXC10GP.gisp.nec.co.jp ([10.38.151.138]) with mapi id 14.03.0319.002; Fri, 5 Apr 2019 13:19:51 +0900 From: Junichi Nomura To: Dave Young CC: Borislav Petkov , "bhe@redhat.com" , "fanc.fnst@cn.fujitsu.com" , "x86@kernel.org" , "kexec@lists.infradead.org" , "kasong@redhat.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Thread-Topic: [PATCH v3] x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernel Thread-Index: AQHU6riZJD2HLBcqv0GoZn6cDbIQhqYsYU0A Date: Fri, 5 Apr 2019 04:19:50 +0000 Message-ID: References: <20190325122302.GC13160@dhcp-128-65.nay.redhat.com> <20190325123229.GL12016@zn.tnic> <20190325231000.GA9184@jeru.linux.bs1.fc.nec.co.jp> <20190326135714.GG1867@zn.tnic> <20190327014852.GA3659@MiWiFi-R3L-srv> <73322ba9-e436-68db-7863-afd31607d969@ce.jp.nec.com> <20190328064343.GA1877@MiWiFi-R3L-srv> <20190328074337.GA9470@jeru.linux.bs1.fc.nec.co.jp> <20190328155256.GP22720@zn.tnic> <20190402102529.GA21698@jeru.linux.bs1.fc.nec.co.jp> <20190404073233.GC5708@dhcp-128-65.nay.redhat.com> In-Reply-To: <20190404073233.GC5708@dhcp-128-65.nay.redhat.com> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.85] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <054A1887037BE0429EE23D2F37416DC1@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/19 4:32 PM, Dave Young wrote: > While we are still debuggin the bug I reproduced, but for this patch > I have still some comments inline. > > BTW, it would be good to start a new thread when you send V4 :) Sure. >> + /* Get systab from boot params. */ >> + systab = (efi_system_table_64_t *) (ei->efi_systab | ((__u64)ei->efi_systab_hi << 32)); >> + if (!systab) >> + error("EFI system table not found in kexec boot_params."); > > Instead of hang the system, return 0 should be better OK. I'll make it something like: if (!systab) { debug_putstr(...); return 0; } >> if (!pa) >> + pa = kexec_get_rsdp_addr(); >> + >> + if (!pa) >> pa = efi_get_rsdp_addr(); > > In case kexec_get_rsdp_addr failed, above code will try efi_get.. again, > but that will also fail for same issue this patch is fixing. In case > kexec we should avoid the efi_get_rsdp_addr. Yeah, I'll set efi_kexec_booted to true in kexec_get_rsdp_addr() if it's kexec booted so that efi_get_rsdp_addr() can exit early in such a case. -- Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.