From nobody Wed Nov 27 10:27:08 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 1699362220383902.5857957110267; Tue, 7 Nov 2023 05:03:40 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 53BFC23C3F; Tue, 7 Nov 2023 13:03:35 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id B6C1023C91 for ; Tue, 7 Nov 2023 13:03:18 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-lZ6B-x-SMoiWxFHVZjCrlA-1; Tue, 07 Nov 2023 08:03:13 -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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61232803C98; Tue, 7 Nov 2023 13:03:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A192492BFA; Tue, 7 Nov 2023 13:03:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id CC6DF1800DDB; Tue, 7 Nov 2023 14:03:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699362197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IOHWcwclobqdsl9Xg2Xkt/KeeQp53aVoWqBsmhryhLo=; b=RFHjpycai90/P65MuPDUJ1G//mjMQ+Xw5FVkGnRuiXkpnm/o+dJleW5v5OnjIJkD5/KkaA +Sq2vie3o4cIXZIEnSqeJWs0wE8crzMnviLW+yfDrY2t4+fMNWwwaS9b4brsaH2rs+rXAr 0DYi1H4GnC2hVFzk70R+5pyitktysvg= X-MC-Unique: lZ6B-x-SMoiWxFHVZjCrlA-1 From: Gerd Hoffmann To: seabios@seabios.org Date: Tue, 7 Nov 2023 14:03:09 +0100 Message-ID: <20231107130309.3257776-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Level: ** Message-ID-Hash: QPTEE5RUT4JB5XH5AAEYPL6QHE7J4WQD X-Message-ID-Hash: QPTEE5RUT4JB5XH5AAEYPL6QHE7J4WQD 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: qemu-devel@nongnu.org, Gerd Hoffmann , Claudio Fontana X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH v5] limit physical address space size 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: 1699362222594100001 Content-Type: text/plain; charset="utf-8" For better compatibility with old linux kernels, see source code comment. Related (same problem in ovmf): https://github.com/tianocore/edk2/commit/c1e853769046 Cc: Claudio Fontana Signed-off-by: Gerd Hoffmann Reported-by: Claudio Fontana --- src/fw/paravirt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index e5d4eca0cb5a..a2c9c64d5e78 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -182,6 +182,14 @@ static void physbits(int qemu_quirk) __func__, signature, pae ? "yes" : "no", CPULongMode ? "yes" := "no", physbits, valid ? "yes" : "no"); =20 + if (valid && physbits > 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 + dprintf(1, "%s: using phys-bits=3D46 (old linux kernel compatibili= ty)\n", __func__); + physbits =3D 46; + } + if (valid) CPUPhysBits =3D physbits; } --=20 2.41.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org