From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58413 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5G8I-0003u0-VU for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:01:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5G88-0001p7-4q for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:01:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5G87-0001ok-Uf for qemu-devel@nongnu.org; Mon, 11 Oct 2010 07:01:20 -0400 Message-ID: <4CB2EE9F.80907@redhat.com> Date: Mon, 11 Oct 2010 13:01:51 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Passing boot order from qemu to seabios References: <20101011101855.GA25030@redhat.com> <4CB2E7D0.1010702@redhat.com> <20101011104351.GB25030@redhat.com> In-Reply-To: <20101011104351.GB25030@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: seabios@seabios.org, qemu-devel@nongnu.org Am 11.10.2010 12:43, schrieb Gleb Natapov: > On Mon, Oct 11, 2010 at 12:32:48PM +0200, Kevin Wolf wrote: >> Am 11.10.2010 12:18, schrieb Gleb Natapov: >>> 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?) >> >> Floppy? Yes, I think we do. >> >>> 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) >> >> If we had a qdev ID for all devices (which I think we should have >> anyway), would this work or is a string not really handy enough? >> > Given qdev ID how seabios knows what device it corresponds to? Right, somehow I assumed that SeaBIOS already has some information about disks, but now I see that this is exactly the problem you're talking about. My suggestion wasn't really helpful then. I think what you described is more or less the only way to do it then. Kevin