On 4/16/21 4:46 AM, Thanos Makatos wrote:
> 
> 
>> -----Original Message-----
>> From: Gerd Hoffmann <kra...@redhat.com>
>> Sent: 16 April 2021 08:15
>> To: Thanos Makatos <thanos.maka...@nutanix.com>
>> Cc: Kevin O'Connor <ke...@koconnor.net>; seabios@seabios.org; John
>> Levon <john.le...@nutanix.com>; Swapnil Ingle
>> <swapnil.in...@nutanix.com>; Liu, Changpeng <changpeng....@intel.com>
>> Subject: Re: [SeaBIOS] SeaBIOS fails to boot from NVMe controller with lots
>> of namespaces
>>
>>   Hi,
>>
>>> Regarding the failure cases, will things break during build
>> (BUILD_MIN_BIOSTABLE=16K), e.g:
>>>
>>> [seabios] Error!  ROM doesn't fit (135584 > 131072)
>>> [seabios]    You have to either increase the size (CONFIG_ROM_SIZE)
>>> [seabios]    or turn off some features (such as hardware support not
>>> [seabios]    needed) to make it fit.  Trying a more recent gcc version
>>> [seabios]    might work too.
>>> [seabios] make: *** [out/bios.bin.prep] Error 1
>>>
>>> Or do we expect undefined behavior at run time?
>>
>> Running out of memory can lead to undefined behavior at run time,
>> depending on which allocations fail.  Typical error pattern is that seabios 
>> can't
>> initialize all devices, leading to boot failures.
>>
>>> 256 namespaces is not an insanely huge number.
>>
>> Well, back in the 80ies when the BIOS interfaces have been created
>> 256 was an insanely huge number ...
>>
>> Given we have a number of real mode constrains for compatibility reasons
>> (like some data structures must live in the f segment) there is no easy way
>> out, we simply can't support an unlimited number of disks (which btw is one
>> of the reasons why the "skip non-bootable disks" code exists).
> 
> SeaBIOS only tries to boot from the first namespace; if that fails other 
> namespaces aren't tried 
> (https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/72LFLT7KFMWE4GVZHWF4G34PKLVG5LRD/).
> If we stick to the current behavior, then there's no reason to probe any 
> other namespace apart from the first one. This greatly reduces memory 
> requirements so we should be able to support the max number of namespaces.
> 
>>
>> Of course there is the option to leave behind the 80ies and go for UEFI.
> 
> Or can just live with it as you suggest and simply document it 😊.

Sorry for thread necro, but CoreOS devs are hitting this issue too, but
using plain emulated qemu nvme. Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1963255

Originally a `-device nvme,...` would report only 1 namespace, and
seabios could boot from it fine. After '7f0f1acedf hw/block/nvme:
support multiple namespaces', the device now reports 256 namespaces, and
seabios fails like described in this thread.

Where can I file this so it doesn't get lost?
Anyone know a qemu command line workaround?

Thanks,
Cole

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

Reply via email to