From nobody Fri Mar 29 07:55:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1617876177; cv=none; d=zohomail.com; s=zohoarc; b=DWW8yHmN+M8nrHANq2ihHwZAg6H6k7bl4LBMCCVd3jzYrjl94QJk0+u2fDZOoiFGKZcgl7m6W42sAYhdhLl5FuXNwhn0Eg+XWFPUN4wiiQesFIxvjAQ92kUg/2pxjpWdnHUrJ7ONqMJ3Nnninln3qzr86Jl80O4K4a/dvHqn3vU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617876177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:To; bh=+a2jOC7v0UNelyyEGLM/45EaE7mmc+Zv4uVkCzuqEMI=; b=ExDRlDdRP/VIYCciY1YoYAYBmguO9tAtCvLsRBivM2M0aCAnpEYhwb3jJsJ4+AhHL47TMTbl1jNqP0bbPLv9/JPMLYlwpeemEQ0ottcZ55A8qRDZRJyaCH/yZClz9gVxO7hk0PKmg4v9pMZPw8H+hxiy7fO3WZHy+tHSuceDZTo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1617876177526515.5596699794935; Thu, 8 Apr 2021 03:02:57 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id D0A6D16A09BB; Thu, 8 Apr 2021 10:02:52 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 5126916A0984 for ; Thu, 8 Apr 2021 10:02:35 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-WdTPWHgRNJ-l5H-n6gtdEg-1; Thu, 08 Apr 2021 06:02:30 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A5FC66D249; Thu, 8 Apr 2021 10:02:29 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D980960BF1; Thu, 8 Apr 2021 10:02:28 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id C89FB1800604; Thu, 8 Apr 2021 12:02:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617876154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D70NUmx5K4F9jZ1eshna5Q4kEcpC9yh17wXtTMWvepQ=; b=amGuj0/5DXP+Ids6bhiPL+0FdZ5aQ7b2gB2jCjbWNb2dhRmVwRyZKhmBOKAi5ta1y8ZU5c 8tSBuvEw0aWDw4/CDJTFq0ZzU0KZZBlzZjTJ1cWRzQWM5ZHRGk+lYnY4AWBAiQXokb+jGY W89rPafaRLbdQq81o7ojgF4Kb0OHx1Q= X-MC-Unique: WdTPWHgRNJ-l5H-n6gtdEg-1 Date: Thu, 8 Apr 2021 12:02:23 +0200 From: Gerd Hoffmann To: Kevin O'Connor Message-ID: <20210408100223.6u3oe7vr43n6d63p@sirius.home.kraxel.org> References: <20210323141836.865691-1-kraxel@redhat.com> <4760a6b7-5fea-7f86-5706-acb5ac065e9a@molgen.mpg.de> <20210326085249.bdt547g2riokiimc@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Message-ID-Hash: 62RVMOB6Y2NGLZADE6F6FXNBZCHIQFU5 X-Message-ID-Hash: 62RVMOB6Y2NGLZADE6F6FXNBZCHIQFU5 X-MailFrom: kraxel@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Menzel , seabios@seabios.org X-Mailman-Version: 3.3.4b1 Precedence: list Subject: [SeaBIOS] Re: [PATCH] boot: add config option for fast device init List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: -- X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Hi, > > > > Add a config option for fast device init (i.e. skip non-bootable > > > > devices). This optimization breaks boot in some rare configuration= s, > > > > specifically in case the boot loader needs access to secondary disk= s. >=20 > Unfortunately, I missed the initial email due to seabios mailing list > problems a few weeks ago. Quote above is the commit message, actual patch below. > What's the reason to add a config option for this setting? We > typically make these choices at runtime using settings from fwcfg. Well, there is a fwcfg setting already. Skipping non-bootable devices happens only in case there is a HALT line in the fw_cfg bootorder file, which translates to "-boot strict=3D{on,off}" on the qemu command line. Problem is that libvirt runs qemu with strict=3Don and provides no way to request strict=3Doff instead. Fixing that is on the way, but it'll take some time as it affects not only libvirt itself but also the management apps using libvirt. So this patch allows to handles the reported regressions with a compile time switch for the time being. If you don't like it, fine, we can also carry the patch downstream for a while until libvirt & co are fixed, it should only be needed temporarily after all. I suspect we are not the only ones running into this though, so it might be useful to have that upstream too ... take care, Gerd ------------------------------ cut here ------------------------- diff --git a/src/boot.c b/src/boot.c index 1effd802ce06..771d2382e38f 100644 --- a/src/boot.c +++ b/src/boot.c @@ -299,6 +299,8 @@ u8 is_bootprio_strict(void) { static int prio_halt =3D -2; =20 + if (!CONFIG_BOOT_FAST_INIT) + return 0; if (prio_halt =3D=3D -2) prio_halt =3D find_prio("HALT"); return prio_halt >=3D 0; diff --git a/src/Kconfig b/src/Kconfig index 3a8ffa15fded..6b750a41b42c 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -72,6 +72,16 @@ endchoice help Support controlling of the boot order via the fw_cfg/CBFS "bootorder" file. + config BOOT_FAST_INIT + depends on BOOTORDER + bool "Fast boot device init" + default y + help + Skip initialization for devices without bootindex. Speeds + up boot and reduced memory footprint, but may cause boot + problems in case the bootloader needs access to secondary + disks. + config HOST_BIOS_GEOMETRY depends on BOOT bool "Boot device bios geometry override" _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org