On Mon, Oct 11, 2010 at 05:32:17PM -0500, Anthony Liguori wrote:
Somebody has to be responsible for enumerating all of the devices that can be booted, communicated it to someone else, and letting that other party reorder things while keeping the former party informed. The options are:
- QEMU let's user choose device boot order based on something that
makes sense to QEMU and it's users 2) QEMU creates a list of device boot order that it prefers and communicates to SeaBIOS. If this is to be authoritative, QEMU must generate a list that follows the BBS 3) SeaBIOS then allows a user to reorder boot devices 4) SeaBIOS tells QEMU the new boot order
Or:
- QEMU let's user choose device boot order based on something that
makes sense to QEMU and it's users 2) SeaBIOS creates a list of bootable devices based on the BBS and anything else it thinks it can boot from 3) SeaBIOS passes this list to QEMU and asks QEMU to adjust ordering 4) QEMU adjusts ordering according to (1) and tells SeaBIOS 5) SeaBIOS then allows a user to reorder boot devices 6) SeaBIOS tells QEMU the new boot order
How about:
1) QEMU let's user choose device boot order based on something that makes sense to QEMU and it's users. It places this info in fw_cfg by providing a list of "path names" for each device. 2) SeaBIOS creates a list of bootable devices based on the BBS and anything else it thinks it can boot from. It prioritizes devices in this list if their "path name" is found in the fw_cfg boot order list provided by qemu. 3) SeaBIOS then allows a user to reorder boot devices.
I'm not sure why step 4 (SeaBIOS tells QEMU the new boot order) is needed.
It may seem like the second option is more complicated, but I think step 2 in the first option is going to be prohibitively difficult and really doesn't fit SeaBIOS very well as bare metal BIOS. The second option is more akin to how this would work on bare metal.
I don't think step 2 will be that hard. There aren't that many ways SeaBIOS can boot a machine. I think we can label them all with unique names (eg, "ata@01:13.0@0", "usb@1234:5678", "virtio@01:13.0", "rom@01:13.0", etc). The qemu list doesn't need to be authoritative - should SeaBIOS know how to boot something that qemu doesn't yet know about, then users will need to use the boot menu until qemu is updated.
-Kevin