[SeaBIOS] Re: Regression 32bit Kernel + Virtio-scsi

Gerd Hoffmann posted 1 patch 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/okm7ao5d4abug5akxc7komkrshdibl3dv3mc6dxcnt2qta4wvr@l6ri2biw5loq
[SeaBIOS] Re: Regression 32bit Kernel + Virtio-scsi
Posted by Gerd Hoffmann 2 months ago
On Mon, Feb 26, 2024 at 10:56:05AM +0000, Max Tottenham wrote:
> On 02/26, Gerd Hoffmann wrote:
> > Recommended action: turn off 64-bit support (long mode) in the cpu:
> > 
> >     qemu -cpu host,lm=off
> 
> Hi Gerd
> 
> Thanks for the response,
> 
> that gets the VM booting - unfortunately we have many customers who may
> be running 32bit distro kernels - we won't know ahead of time before
> launching the VM whether they need this compatibility flag or not, I
> don't think we can use this as a suitable work-around.

You can turn this off completely this way:

--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -1195,8 +1195,10 @@ pci_setup(void)
         }
     }
 
+#if 0
     if (CPUPhysBits >= 36 && CPULongMode && RamSizeOver4G)
         pci_pad_mem64 = 1;
+#endif
 
     dprintf(1, "=== PCI bus & bridge init ===\n");
     if (pci_probe_host() != 0) {

Another option would be to try tweak the condition which turns on
pci_pad_mem64.  The obvious candidate would be to raise the memory
limit, i.e. turn this on only in case memory is present above 64G
(outside the PAE-addressable physical address space), or choose
some value between 4G and 64G.

I'm wondering how widespread it is in 2024 to run 32bit kernels with
alot of memory?

The 32-bit kernel has 1G of kernel address space and can therefore map
less than 1G of all RAM permanently.  Memory above that limit
('highmem') must be mapped and unmapped if the kernel wants access it.
Which is a significant performance hit (compared to a 64bit kernel),
and the more memory you add the worse it gets ...

Also finding linux distros which provide full i386 support (including
timely security updates) becomes increasingly difficult.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org