From nobody Sun Dec 22 01:19:31 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 1718971549274755.2728110463493; Fri, 21 Jun 2024 05:05:49 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id B7F9EEC760; Fri, 21 Jun 2024 12:05:43 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id B3F3DEC65D for ; Fri, 21 Jun 2024 12:05:25 +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-581-qexwmgsRMSqvr78fyQ8YxA-1; Fri, 21 Jun 2024 08:05:21 -0400 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 434A719560AE; Fri, 21 Jun 2024 12:05:20 +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 E478A1956048; Fri, 21 Jun 2024 12:05:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id B900518011E0; Fri, 21 Jun 2024 14:05:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718971524; 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=lpNCyA7yAsNNvE9fJ03enD5UrGWlSG52QkdGnHblifA=; b=LjHtgTnBK17D5drXVPRZp20053BmKh6fSwNj4PtF2XHFJiqbFxQbXuzNI1ZT7DYQO3MQKt U7D/KhRQCYBQSNiVCXuJfnxUZYk9JqbF1bCWV/ivL6PDZr2Yj17dOvK9dt6c2Sx7+uZqQq SUG2w3XIQ/eQkYoBA4QNDr11TEx+f4g= X-MC-Unique: qexwmgsRMSqvr78fyQ8YxA-1 Date: Fri, 21 Jun 2024 14:05:17 +0200 From: Gerd Hoffmann To: John Levon Message-ID: References: <20240619102114.131179-1-john.levon@nutanix.com> <20240619102114.131179-4-john.levon@nutanix.com> MIME-Version: 1.0 In-Reply-To: <20240619102114.131179-4-john.levon@nutanix.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Message-ID-Hash: TCAVMUNNGAP6QRURNL7ICOCZTKXXAOZ3 X-Message-ID-Hash: TCAVMUNNGAP6QRURNL7ICOCZTKXXAOZ3 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: seabios@seabios.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] Re: [PATCH v2 4/4] only enable 64bit pci io window when RAM >64G 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: 1718971549892100001 Content-Type: text/plain; charset="utf-8" On Wed, Jun 19, 2024 at 11:21:14AM GMT, John Levon wrote: > Older 32-bit Linux VMs (including Ubuntu 16.10) have issues with the > 64-bit pci io window, failing during boot with errors like: Well. Why people would use *that* ubuntu version is not clear to me. It's *loooooong* out of support. Even the LTS version from that year (16.04) is not supported any more. But it is at least available for download still, so I gave it a spin. Turns out it apparently can't deal with PCI bars mapped above 16TB (aka 44 phys-bits). Test patch below. take care, Gerd diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index bb44dc296047..a43876a931c9 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -1189,11 +1189,16 @@ pci_setup(void) =20 if (CPUPhysBits) { pci_mem64_top =3D 1LL << CPUPhysBits; - if (CPUPhysBits > 46) { - // Old linux kernels have trouble dealing with more than 46 - // phys-bits, so avoid that for now. Seems to be a bug in the - // virtio-pci driver. Reported: centos-7, ubuntu-18.04 - pci_mem64_top =3D 1LL << 46; + if (CPUPhysBits > 44) { + // Old linux kernels have trouble dealing with more than 44/46 + // phys-bits. Seems to be a bug in the virtio-pci driver. + // 46: centos-7, ubuntu-18.04 + // 44: ubuntu-16.04 + // Limit the used address space to mitigate the bug, except we= are + // running in a guest with more than 1TB of memory installed. + if (RamSizeOver4G < (1LL << 40)) { + pci_mem64_top =3D 1LL << 44; + } } } =20 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org