From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5KgQ-0000hN-MR for qemu-devel@nongnu.org; Mon, 11 Oct 2010 11:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5KgL-0008L2-Gn for qemu-devel@nongnu.org; Mon, 11 Oct 2010 11:53:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5KgL-0008Kx-Ap for qemu-devel@nongnu.org; Mon, 11 Oct 2010 11:52:57 -0400 Date: Mon, 11 Oct 2010 17:52:54 +0200 From: Gleb Natapov Message-ID: <20101011155254.GF28008@redhat.com> References: <20101011101855.GA25030@redhat.com> <4CB328A2.9090608@redhat.com> <20101011153928.GE28008@redhat.com> <4CB33066.5010903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CB33066.5010903@redhat.com> Subject: [Qemu-devel] Re: [SeaBIOS] [RFC] Passing boot order from qemu to seabios List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: seabios@seabios.org, qemu-devel@nongnu.org On Mon, Oct 11, 2010 at 05:42:30PM +0200, Avi Kivity wrote: > On 10/11/2010 05:39 PM, Gleb Natapov wrote: > >On Mon, Oct 11, 2010 at 05:09:22PM +0200, Avi Kivity wrote: > >> On 10/11/2010 12:18 PM, Gleb Natapov wrote: > >> >Currently if VM is started with multiple disks it is almost impossible to > >> >guess which one of them will be used as boot device especially if there > >> >is a mix of ATA/virtio/SCSI devices. Essentially BIOS decides the order > >> >and without looking into the code you can't tell what the order will > >> >be (and in qemu-kvm if boot=on is used it brings even more havoc). We > >> >should allow fine-grained control of boot order from qemu command line, > >> >or as a minimum control what device will be used for booting. > >> > > >> >To do that along with inventing syntax to specify boot order on qemu > >> >command line we need to communicate boot order to seabios via fw_cfg > >> >interface. For that we need to have a way to unambiguously specify a > >> >disk from qemu to seabios. PCI bus address is not enough since not all > >> >devices are PCI (do we care about them?) and since one PCI device may > >> >control more then one disk (ATA slave/master, SCSI LUNs). We can do what > >> >EDD specification does. Describe disk as: > >> > bus type (isa/pci), > >> > address on a bus (16 bit base address for isa, b/s/f for pci) > >> > device type (ATA/SCSI/VIRTIO) > >> > device path (slave/master for ATA, LUN for SCSI, nothing for virtio) > >> > > >> >Will it cover all use cased? Any other ideas? Any ideas about qemu > >> >command line syntax? May be somebody whats to implement it? :) > >> > >> Instead of fwcfg, we should store the boot order in the bios. This > >> allows seabios to implement persistent boot selection and control > >> boot order from within the guest. > >> > >It is not "instead of" it is in a best case "in addition too". First of > >all seabios does not have persistent storage currently and second I much > >prefer specifying boot device from command line instead of navigating > >bios menus. That what we have to do on real HW because there is not > >other way to do it, but in virtualization we can do better. > > Ok. So fwcfg will have an option "do your default thing" which the > bios can take as a hint to look in cmos memory. > Definitely. If qemu does not provide any info about boot order default logic should be used. -- Gleb.