On Tue, 12 Nov 2024 12:33:58 +0100 Gerd Hoffmann kraxel@redhat.com wrote:
On Thu, Oct 24, 2024 at 12:36:16PM +0200, Claudio Fontana wrote:
What do we lose by just reverting things to the state that actually worked?
Well, the world is moving forward, devices getting more memory and larger pci bars. GPUs can have multi-GB pci bars these days. nvidia has a NPU with a 128 GB pci bar. Note this is larger than the whole (initial) PAE address space. I want seabios supporting that kind of devices well.
The range of configurations becomes more and more wide, with huge devices as mentioned above on one end and old 32-bit guests on the other end. Have seabios automatically setup itself turned out to be a hard problem (as this thread clearly shows).
We already have a runtime config switch to force 32-bit friendly setup (turn off long mode support in the vcpu).
We already have a heuristic to select the 32-bit friendly setup, which right now is simply "no memory above 4G is present".
The options I see to move this forward:
(1) Tweak the heuristic. (1a) Raise the memory limit.
that would be improvement for legacy but worsen modern guest situation. Perhaps we at the point where heuristic can't help anymore.
(1b) Maybe also look at other things such as the machine type. The 'pc' machine type does not support pci express, so it is highly unlikely that devices with huge pci bars will be used with it and we could use that as another hint to better select the 32-bit friendly setup.
If I'm not wrong it's possible to assign a device with large PCI bar to 'pc' machine. so just machine type won't be sufficient.
(1c) Other ideas?
Perhaps a fwcfg file '32_bit_guest' passed to Seabios can serve as switch. But given Seabios and QEMU have no clue about OS nor should they, onus would be on management to configure qemu with compat option. Which leads to #2
(2) Add a compile-time option (CONFIG_...) to force 32-bit friendly setup unconditionally.
Given that mgmt would have configure QEMU one way or another to handle legacy guests. This option might be preferable to runtime switch. That also could help us drop some heuristics and pick more suitable defaults for 32 and 64 bit variant instead of a poorly working compromise.
Comments?
take care, Gerd
PS: sorry for the long delay, was offline in october and had quite a email backlog afterwards ...
SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org