From nobody Thu Dec 26 23:52:04 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 Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1731670852096113.76996438621586; Fri, 15 Nov 2024 03:40:52 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id EBACFE0E60; Fri, 15 Nov 2024 11:40:47 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id EFF57E0EBF for ; Fri, 15 Nov 2024 11:40:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-Ol7bsoVINI2pqeZ9YnE2eQ-1; Fri, 15 Nov 2024 06:40:14 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96932195608C for ; Fri, 15 Nov 2024 11:40:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 500DC1953880; Fri, 15 Nov 2024 11:40:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 00B721800DFC; Fri, 15 Nov 2024 12:40:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731670815; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pHzc8C7fSROiEZilEQX1wyibm+VR+wr7iZRLgB27Txw=; b=KBnorxwGK5venCmZ3fjFWP57tOiUhYgZP9hHnWZrh+/3ONBojJt766zBKybMFgxmRSj2ja eNhtht1AVcNxergd7cqPj5/ZA4oLtMe5v8PO/hffp7xd7HtGUhWgCls0G6/QteHM8x3vEY f9Q6v6k7Wd2dw/RMXpgwpdLhnQ87k6I= X-MC-Unique: Ol7bsoVINI2pqeZ9YnE2eQ-1 X-Mimecast-MFC-AGG-ID: Ol7bsoVINI2pqeZ9YnE2eQ From: Gerd Hoffmann To: seabios@seabios.org Date: Fri, 15 Nov 2024 12:40:07 +0100 Message-ID: <20241115114010.51342-2-kraxel@redhat.com> In-Reply-To: <20241115114010.51342-1-kraxel@redhat.com> References: <20241115114010.51342-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O21nMW9KArxht9fjPhXECKlAxPrs8XSCKWL638loOT4_1731670813 X-Mimecast-Originator: redhat.com Message-ID-Hash: VSE5IMGAQIN22C75XBLQQCWLUE4HBYZA X-Message-ID-Hash: VSE5IMGAQIN22C75XBLQQCWLUE4HBYZA 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: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 1/4] add guest hint variable 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) X-ZM-MESSAGEID: 1731670852416116600 Content-Type: text/plain; charset="utf-8"; x-default="true" This holds the hint whenever the guest is 32-bit or 64-bit, so seabios can optimize the memory layout (pci bar placement) accordingly. Default is '32' for best backward compatibility. Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.h | 1 + src/fw/paravirt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h index 62a2cd075d2b..cf28528e0261 100644 --- a/src/fw/paravirt.h +++ b/src/fw/paravirt.h @@ -33,6 +33,7 @@ extern u64 RamSizeOver4G; extern int PlatformRunningOn; extern u8 CPUPhysBits; extern u8 CPULongMode; +extern u8 GuestHint; =20 static inline int runningOnQEMU(void) { return CONFIG_QEMU || ( diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index e5d4eca0cb5a..fbd00f1c072f 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -36,6 +36,8 @@ u64 RamSizeOver4G; u8 CPUPhysBits; // 64bit processor u8 CPULongMode; +// memory layout hint (32bit or 64bit guests). +u8 GuestHint =3D 32; // Type of emulator platform. int PlatformRunningOn VARFSEG; // cfg enabled --=20 2.47.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Thu Dec 26 23:52:04 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 Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1731670866760387.2853541170608; Fri, 15 Nov 2024 03:41:06 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 97876E0F94; Fri, 15 Nov 2024 11:41:02 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 2F965E0EBE for ; Fri, 15 Nov 2024 11:40:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-251-GFEJiNHnNrS0OFgBtnAuPA-1; Fri, 15 Nov 2024 06:40:16 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 39AE61954B15 for ; Fri, 15 Nov 2024 11:40:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EED9B1953882; Fri, 15 Nov 2024 11:40:15 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 069311800DFE; Fri, 15 Nov 2024 12:40:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731670818; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jsGd4IMrCBc2wERjTIhz/d1WCaETHod/IwLG6pYhuIM=; b=Q7hXiLCFlZbELPMrkYJG4PcWSdQ07Kv8gBKnxfIBk9TfwNVsASCq9QE7DOHLhdq4DvP1jt fF5PCxvUfNqL3SD+BPjs+CpOGUXtOGvGVCxSr3GplBasf7JGJuZNpmdqNvyxyq8yEQkrLO NdfISHCwkCJ/rFSnN6D4nQB4DcAp+7k= X-MC-Unique: GFEJiNHnNrS0OFgBtnAuPA-1 X-Mimecast-MFC-AGG-ID: GFEJiNHnNrS0OFgBtnAuPA From: Gerd Hoffmann To: seabios@seabios.org Date: Fri, 15 Nov 2024 12:40:08 +0100 Message-ID: <20241115114010.51342-3-kraxel@redhat.com> In-Reply-To: <20241115114010.51342-1-kraxel@redhat.com> References: <20241115114010.51342-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: x6Ii2OdDO4lRqpAGcwzBh7I_CxsHHRxEWVkdTkj2_EA_1731670816 X-Mimecast-Originator: redhat.com Message-ID-Hash: NTJZ6JEUC6JWE55IX2DWAF3XLMCTSYY2 X-Message-ID-Hash: NTJZ6JEUC6JWE55IX2DWAF3XLMCTSYY2 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: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 2/4] use guest hint as additional condition 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) X-ZM-MESSAGEID: 1731670868428116600 Content-Type: text/plain; charset="utf-8"; x-default="true" check guest hint as additional condition to enable the 64-bit guest friendly memory layout. With '32' seabios will use traditional pci configuration for best compatibility: all PCI bars will be mapped into the 32-bit PCI MMIO window below 4G if they fit there. With '64' seabios will use the new pci configuration introduced by commit 96a8d130a8c2 ("be less conservative with the 64bit pci io window"): the 64-bit MMIO window will be used unconditionally and PCI bridges will get larger bridge windows. Signed-off-by: Gerd Hoffmann --- src/fw/pciinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index b3e359d7fe62..ab28286e7018 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -1202,7 +1202,7 @@ pci_setup(void) } } =20 - if (CPUPhysBits >=3D 36 && CPULongMode && RamSizeOver4G) + if (CPUPhysBits >=3D 36 && CPULongMode && RamSizeOver4G && GuestHint = =3D=3D 64) pci_pad_mem64 =3D 1; =20 dprintf(1, "=3D=3D=3D PCI bus & bridge init =3D=3D=3D\n"); --=20 2.47.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Thu Dec 26 23:52:04 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 Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1731670881930772.4119186407729; Fri, 15 Nov 2024 03:41:21 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id CAD09E0F14; Fri, 15 Nov 2024 11:41:17 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 331A3E0EBF for ; Fri, 15 Nov 2024 11:40:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-685-lXfSWnv0P_yk40mDwKvpvQ-1; Fri, 15 Nov 2024 06:40:17 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45E0D19560B1 for ; Fri, 15 Nov 2024 11:40:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 001CB1956054; Fri, 15 Nov 2024 11:40:15 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 0B1231801009; Fri, 15 Nov 2024 12:40:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731670818; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TuQSKJOCOKCaxU8ALNnBNFxXoYDrRZAXkK3fDE2oEOo=; b=iRk/gSbftyXL8Q1oOdP1llkVC4ElizDxQgNb5JfwmYJQSLh4n5hdE22cV03pThIx/6+YNQ YLKM0RMkNRHV2LqYjl9306cTM0RUTgHTx1ZyqLHVYwZyBdqXTer3vuQqj6Uwpcbk3vTyoV yGySztwfTrVvecCCgTH7kMgDEZX2Vrw= X-MC-Unique: lXfSWnv0P_yk40mDwKvpvQ-1 X-Mimecast-MFC-AGG-ID: lXfSWnv0P_yk40mDwKvpvQ From: Gerd Hoffmann To: seabios@seabios.org Date: Fri, 15 Nov 2024 12:40:09 +0100 Message-ID: <20241115114010.51342-4-kraxel@redhat.com> In-Reply-To: <20241115114010.51342-1-kraxel@redhat.com> References: <20241115114010.51342-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: eK7FFqKBTdyQx-4BzJhOqbF9oTMsJw6s7HyUxGR-13A_1731670816 X-Mimecast-Originator: redhat.com Message-ID-Hash: BJ77N2D4NEAY4SPSN25SZVZCE43QIP3I X-Message-ID-Hash: BJ77N2D4NEAY4SPSN25SZVZCE43QIP3I 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: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 3/4] add guest hint default kconfig 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) X-ZM-MESSAGEID: 1731670882489116600 Content-Type: text/plain; charset="utf-8"; x-default="true" Add compile time config option for the guest hint default value. Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.c | 2 +- src/Kconfig | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index fbd00f1c072f..001be7caf102 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -37,7 +37,7 @@ u8 CPUPhysBits; // 64bit processor u8 CPULongMode; // memory layout hint (32bit or 64bit guests). -u8 GuestHint =3D 32; +u8 GuestHint =3D CONFIG_DEFAULT_GUEST_HINT; // Type of emulator platform. int PlatformRunningOn VARFSEG; // cfg enabled diff --git a/src/Kconfig b/src/Kconfig index 3a8ffa15fded..7c8104f01718 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -478,6 +478,13 @@ menu "BIOS interfaces" help Provide TPM support along with TCG BIOS extensions =20 + config DEFAULT_GUEST_HINT + int "tweak default config for 32-bit or 64-bit guests" + default 32 + help + Optimize memory layout (specifically the placement + of pci bars) for 32-bit or 64-bit guests. + endmenu =20 menu "BIOS Tables" --=20 2.47.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Thu Dec 26 23:52:04 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 Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 17316708986348.347386849952727; Fri, 15 Nov 2024 03:41:38 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id D2B7FE0EA1; Fri, 15 Nov 2024 11:41:33 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 2D0A0E0EBF for ; Fri, 15 Nov 2024 11:40:22 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-5J8wbcH3OYidWNqo1CaADw-1; Fri, 15 Nov 2024 06:40:20 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 508F219560A2 for ; Fri, 15 Nov 2024 11:40:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0B7A91956089; Fri, 15 Nov 2024 11:40:18 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 0F54E180100B; Fri, 15 Nov 2024 12:40:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731670821; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kmFx0iRU0SoaN/4jixzPO2Lc8OEz2usJukjC5apYhw0=; b=drZjzPYWgYl3MSGpeeYLiBjfbA3IyBuErPUye4hQO0UOK2c2aRL0snmPN6z9Dt9uLU6T17 R+rHKFnX4McGSfxP7Q7+/U1KW/yUFDCxSiiKw63e4Xq163NxyyrUtvvPEL3Fm8iDSiXNTw BXfJfuSH0ZFFYslglBPuiDAW1fGDy2Y= X-MC-Unique: 5J8wbcH3OYidWNqo1CaADw-1 X-Mimecast-MFC-AGG-ID: 5J8wbcH3OYidWNqo1CaADw From: Gerd Hoffmann To: seabios@seabios.org Date: Fri, 15 Nov 2024 12:40:10 +0100 Message-ID: <20241115114010.51342-5-kraxel@redhat.com> In-Reply-To: <20241115114010.51342-1-kraxel@redhat.com> References: <20241115114010.51342-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vBuDc9oO_j9fcsrMibNqkD-H3zJEeoG9XCEahiXMnE8_1731670819 X-Mimecast-Originator: redhat.com Message-ID-Hash: LLAWYSIX6UXLCESJB5HV7DJXTZJQGOWF X-Message-ID-Hash: LLAWYSIX6UXLCESJB5HV7DJXTZJQGOWF 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: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 4/4] add guest hint fw_cfg override 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) X-ZM-MESSAGEID: 1731670900686116600 Content-Type: text/plain; charset="utf-8"; x-default="true" Add runtime fwcfg override for the guest hint. Usage: qemu -fw_cfg name=3Detc/guest-hint,string=3D32 Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index 001be7caf102..25b37647d299 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -720,6 +720,13 @@ void qemu_cfg_init(void) dprintf(1, "Moving pm_base to 0x%x\n", acpi_pm_base); } =20 + // guest hint + char *hint =3D romfile_loadfile("etc/guest-hint", NULL); + if (hint && strcmp(hint, "32") =3D=3D 0) + GuestHint =3D 32; + if (hint && strcmp(hint, "64") =3D=3D 0) + GuestHint =3D 64; + // serial console u16 nogfx =3D 0; qemu_cfg_read_entry(&nogfx, QEMU_CFG_NOGRAPHIC, sizeof(nogfx)); --=20 2.47.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org