From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D82F79D7A6 for ; Mon, 5 Jun 2023 09:44:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A840A24618 for ; Mon, 5 Jun 2023 09:43:57 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 5 Jun 2023 09:43:55 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D279848998 for ; Mon, 5 Jun 2023 09:43:54 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Mon, 5 Jun 2023 09:43:50 +0200 Message-Id: <20230605074350.98641-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH edk2-firmware] add patch to work around older guest kernel bug X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2023 07:44:27 -0000 by limiting the phys-bits to 46 instead of 47. On Ubuntu 18.04 with kernel 4.15, using 47 leads to a strange issue where initialization of VirtIO devices would fail. Reported in the community forum: https://forum.proxmox.com/threads/127410/ Signed-off-by: Fiona Ebner --- ...latformInitLib-limit-phys-bits-to-46.patch | 46 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 47 insertions(+) create mode 100644 debian/patches/0001-OvmfPkg-PlatformInitLib-limit-phys-= bits-to-46.patch diff --git a/debian/patches/0001-OvmfPkg-PlatformInitLib-limit-phys-bits-to= -46.patch b/debian/patches/0001-OvmfPkg-PlatformInitLib-limit-phys-bits-to-= 46.patch new file mode 100644 index 0000000..7f49a14 --- /dev/null +++ b/debian/patches/0001-OvmfPkg-PlatformInitLib-limit-phys-bits-to-46.pat= ch @@ -0,0 +1,46 @@ +From 89a12f2a42b989e7925b4a71e503209971eaa271 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Thu, 1 Jun 2023 09:57:31 +0200 +Subject: [PATCH] OvmfPkg/PlatformInitLib: limit phys-bits to 46. + +Older linux kernels have problems with phys-bits larger than 46, +ubuntu 18.04 (kernel 4.15) has been reported to be affected. + +Reduce phys-bits limit from 47 to 46. + +Reported-by: Fiona Ebner +Signed-off-by: Gerd Hoffmann +--- + OvmfPkg/Library/PlatformInitLib/MemDetect.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library= /PlatformInitLib/MemDetect.c +index 38cece9173..4d0522ce22 100644 +--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c ++++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c +@@ -657,16 +657,19 @@ PlatformAddressWidthFromCpuid ( + ));=0D + =0D + if (Valid) {=0D +- if (PhysBits > 47) {=0D ++ if (PhysBits > 46) {=0D + /*=0D + * Avoid 5-level paging altogether for now, which limits=0D + * PhysBits to 48. Also avoid using address bit 48, due to sign=0D + * extension we can't identity-map these addresses (and lots of=0D + * places in edk2 assume we have everything identity-mapped).=0D + * So the actual limit is 47.=0D ++ *=0D ++ * Also some older linux kernels apparently have problems handling= =0D ++ * phys-bits > 46 correctly, so use that as limit.=0D + */=0D +- DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 47 (avoid 5-level paging= )\n", __func__));=0D +- PhysBits =3D 47;=0D ++ DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 46 (avoid 5-level paging= )\n", __func__));=0D ++ PhysBits =3D 46;=0D + }=0D + =0D + if (!Page1GSupport && (PhysBits > 40)) {=0D +--=20 +2.39.2 + diff --git a/debian/patches/series b/debian/patches/series index f1ec614..a9ee2be 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ no-stack-protector-all-archs.diff brotlicompress-disable.diff x64-baseline-abi.patch Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-executabl.patch +0001-OvmfPkg-PlatformInitLib-limit-phys-bits-to-46.patch --=20 2.39.2