[libvirt] [PATCH 09/34] Specify bus/unit instead of index for disks with QEMU

Daniel P. Berrange berrange at redhat.com
Fri Jan 15 13:53:12 UTC 2010


On Fri, Jan 15, 2010 at 02:34:21PM +0100, Daniel Veillard wrote:
> On Fri, Jan 08, 2010 at 05:23:05PM +0000, Daniel P. Berrange wrote:
> > The current code for using -drive simply sets the -drive 'index'
> > parameter. QEMU internally converts this to bus/unit depending
> > on the type of drive. This does not give us precise control over
> > the bus/unit assignment though. This change switches over to make
> > libvirt explicitly calculate the bus/unit number.
> > 
> > In addition bus/unit/index are actually irrelevant for VirtIO
> > disks, since each virtio disk is a separate PCI device. No disk
> > controller is involved.
> > 
> > Doing the conversion to bus/unit in libvirt allows us to correctly
> > attach SCSI controllers when required.
> > 
> > * src/qemu/qemu_conf.c: Specify bus/unit instead of index for
> >   disks
> > * tests/qemuxml2argvdata/qemuxml2argv-disk*.args: Switch over from
> >   using index=NNNN, to bus=NN, unit=NN for SCSI/IDE/Floppy disks
> 
>   Hum, that's an importabt change, but I'm a bit surprized to not
> see any checking from the version or help message to detect support.
> Was full addressing implemented so long ago that we shouldn't check for
> it and try to detect at startup if it's missing ? Just wondering,
> not a blocker !

Yeah, it has supported this syntax for as long as -drive has existed
so the check for '-drive' is sufficient

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list