* [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device.
@ 2011-01-30 10:29 Gleb Natapov
2011-01-30 10:29 ` [Qemu-devel] [PATCHv2 2/2] Add boot index documentation Gleb Natapov
2011-01-31 8:20 ` [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Markus Armbruster
0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2011-01-30 10:29 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
hw/usb-msd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 11722c7..d9df4f2 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -532,6 +532,7 @@ static int usb_msd_initfn(USBDevice *dev)
}
}
+ add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0");
return 0;
}
@@ -596,6 +597,7 @@ static USBDevice *usb_msd_init(const char *filename)
static struct USBDeviceInfo msd_info = {
.product_desc = "QEMU USB MSD",
.qdev.name = "usb-storage",
+ .qdev.fw_name = "storage",
.qdev.size = sizeof(MSDState),
.usb_desc = &desc,
.init = usb_msd_initfn,
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCHv2 2/2] Add boot index documentation.
2011-01-30 10:29 [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Gleb Natapov
@ 2011-01-30 10:29 ` Gleb Natapov
2011-01-31 8:20 ` [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Markus Armbruster
1 sibling, 0 replies; 3+ messages in thread
From: Gleb Natapov @ 2011-01-30 10:29 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
docs/bootindex.txt | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
create mode 100644 docs/bootindex.txt
diff --git a/docs/bootindex.txt b/docs/bootindex.txt
new file mode 100644
index 0000000..16083b3
--- /dev/null
+++ b/docs/bootindex.txt
@@ -0,0 +1,43 @@
+= Bootindex propery =
+
+Block and net devices have bootindex property. This property is used to
+determine the order in which firmware will consider devices for booting
+the guest OS. If the bootindex property is not set for a device, it gets
+lowest boot priority. There is no particular order in which devices with
+unset bootindex property will be considered for booting, but they will
+still be bootable.
+
+== Example ==
+
+Lets assume we have QEMU machine with two NICs (virtio, e1000) and two
+disks (IDE, virtio):
+
+qemu -drive file=disk1.img,if=none,id=disk1
+ -device ide-drive,drive=disk1,bootindex=4
+ -drive file=disk2.img,if=none,id=disk2
+ -device virtio-blk-pci,drive=disk2,bootindex=3
+ -netdev type=user,id=net0 -device virtio-net-pci,netdev=net0,bootindex=2
+ -netdev type=user,id=net1 -device e1000,netdev=net1,bootindex=1
+
+Given the command above, firmware should try to boot from the e1000 NIC
+first. If this fails, it should try the virtio NIC next, if this fails
+too, it should try the virtio disk, and then the IDE disk.
+
+== Limitations ==
+
+1. Some firmware has limitations on which devices can be considered for
+booting. For instance, the PC BIOS boot specification allows only one
+disk to be bootable. If boot from disk fails for some reason, the BIOS
+won't retry booting from other disk. It still can try to boot from
+floppy or net, though.
+
+2. Sometimes, firmware cannot map the device path QEMU wants firmware to
+boot from to a boot method. It doesn't happen for devices the firmware
+can natively boot from, but if firmware relies on an option ROM for
+booting, and the same option ROM is used for booting from more then one
+device, the firmware may not be able to ask the option ROM to boot from
+a particular device reliably. For instance with PC BIOS, if a SCSI HBA
+has three bootable devices target1, target3, target5 connected to it,
+the option ROM will have a boot method for each of them, but it is not
+possible to map from boot method back to a specific target. This is a
+shortcoming of PC BIOS boot specification.
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device.
2011-01-30 10:29 [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Gleb Natapov
2011-01-30 10:29 ` [Qemu-devel] [PATCHv2 2/2] Add boot index documentation Gleb Natapov
@ 2011-01-31 8:20 ` Markus Armbruster
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2011-01-31 8:20 UTC (permalink / raw)
To: Gleb Natapov; +Cc: qemu-devel
Both patches look fine to me.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-31 8:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-30 10:29 [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Gleb Natapov
2011-01-30 10:29 ` [Qemu-devel] [PATCHv2 2/2] Add boot index documentation Gleb Natapov
2011-01-31 8:20 ` [Qemu-devel] [PATCHv2 1/2] Add bootindex handling into usb storage device Markus Armbruster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).