Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-16 Thread Gleb Natapov
On Thu, May 13, 2010 at 07:49:40PM +0300, Avi Kivity wrote:
> On 05/10/2010 06:58 PM, Anthony Liguori wrote:
> >>Isn't this problem unrelated to this patch?  I mean if I start qemu with
> >>two ide devices can I specify from qemu command line which one I want to
> >>boot from?
> >
> >That's sort of what I'm asking.  If you compare this approach to
> >extboot, extboot provided a capability to select a disk.  I think
> >it can be argued though that this isn't a necessary feature to
> >carry over and I'm looking for additional opinions on that.
> 
> I'd say it's a necessary feature, but not one to carry over from the
> extboot implementation.  We have the seabios boot menu (how to reach
> it?), we need to store the nvram persistently,  and we need to
> extend the selection menu to qemu, but that's unrelated to this
> patch.
> 
To reach seabios boot menu run qemu with "-boot menu=on" option and press
f12 when prompted.

--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-13 Thread Avi Kivity

On 05/10/2010 06:58 PM, Anthony Liguori wrote:

Isn't this problem unrelated to this patch?  I mean if I start qemu with
two ide devices can I specify from qemu command line which one I want to
boot from?


That's sort of what I'm asking.  If you compare this approach to 
extboot, extboot provided a capability to select a disk.  I think it 
can be argued though that this isn't a necessary feature to carry over 
and I'm looking for additional opinions on that.


I'd say it's a necessary feature, but not one to carry over from the 
extboot implementation.  We have the seabios boot menu (how to reach 
it?), we need to store the nvram persistently,  and we need to extend 
the selection menu to qemu, but that's unrelated to this patch.


--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Kevin O'Connor
On Tue, May 11, 2010 at 03:47:40PM +0300, Gleb Natapov wrote:
> On Tue, May 11, 2010 at 08:45:29AM -0400, Kevin O'Connor wrote:
> > On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote:
> > > From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and
> > > CMOS_BIOS_BOOTFLAG2 from non-volatile memory.  The values index into
> > > bev[], which contains IPL entries (the drives).
> > > 
> > > Is the order of bev[] entries well-defined?  Is there a way for QEMU
> > > command-line to know that the first virtio-blk device corresponds to x
> > > and the IDE CD-ROM corresponds to y?
> > 
> > SeaBIOS arranges for bev[0] = floppy, bev[1] = hd, bev[2] = cdrom, and
> > bev[3] to be the first network card - it does this so that the boot
> > order can be read from qemu.  However, it's a pain to force this
> > order.
> > 
> What if there are more then one disk?

It's possible to boot from the A drive (floppy) or the C drive (hd).
There's no standard way to boot from the D drive.  So, when booting
from the second hard drive, SeaBIOS arranges for that drive to be
mapped as the C drive.

The boot order (eg, floppy, hd, cdroms, network cards) is determined
by the BEV (Boot Execution Vector) list.  The harddrive registration
order (eg, C, D, E) is determined by the BCV (Boot Connection Vector)
list.

When one selects a hard drive in SeaBIOS' boot menu, SeaBIOS actually
does two things - it makes hd booting the first entry in the BEV list
and it makes the selected hd the first entry in the BCV list.

It's a mess - but that's what the BIOS Boot Specification (BBS)
defines.  Both option roms and bootloaders depend on this behavior.

-Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 08:45:29AM -0400, Kevin O'Connor wrote:
> On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote:
> > From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and
> > CMOS_BIOS_BOOTFLAG2 from non-volatile memory.  The values index into
> > bev[], which contains IPL entries (the drives).
> > 
> > Is the order of bev[] entries well-defined?  Is there a way for QEMU
> > command-line to know that the first virtio-blk device corresponds to x
> > and the IDE CD-ROM corresponds to y?
> 
> SeaBIOS arranges for bev[0] = floppy, bev[1] = hd, bev[2] = cdrom, and
> bev[3] to be the first network card - it does this so that the boot
> order can be read from qemu.  However, it's a pain to force this
> order.
> 
What if there are more then one disk?

--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Kevin O'Connor
On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote:
> From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and
> CMOS_BIOS_BOOTFLAG2 from non-volatile memory.  The values index into
> bev[], which contains IPL entries (the drives).
> 
> Is the order of bev[] entries well-defined?  Is there a way for QEMU
> command-line to know that the first virtio-blk device corresponds to x
> and the IDE CD-ROM corresponds to y?

SeaBIOS arranges for bev[0] = floppy, bev[1] = hd, bev[2] = cdrom, and
bev[3] to be the first network card - it does this so that the boot
order can be read from qemu.  However, it's a pain to force this
order.

-Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html