From: Gerd Hoffmann <kraxel@redhat.com>
To: seabios@seabios.org
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Claudio Fontana <cfontana@suse.de>
Subject: [PATCH v5] limit physical address space size
Date: Tue, 7 Nov 2023 14:03:09 +0100 [thread overview]
Message-ID: <20231107130309.3257776-1-kraxel@redhat.com> (raw)
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 <cfontana@suse.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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");
+ 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=46 (old linux kernel compatibility)\n", __func__);
+ physbits = 46;
+ }
+
if (valid)
CPUPhysBits = physbits;
}
--
2.41.0
next reply other threads:[~2023-11-07 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 13:03 Gerd Hoffmann [this message]
2023-11-08 18:35 ` [SeaBIOS] [PATCH v5] limit physical address space size Kevin O'Connor
2023-11-10 8:36 ` Claudio Fontana
2023-11-10 10:51 ` Gerd Hoffmann
2023-11-10 11:04 ` Gerd Hoffmann
2023-11-10 16:44 ` Kevin O'Connor
2023-11-10 17:05 ` Kevin O'Connor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231107130309.3257776-1-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=cfontana@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.