]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Separate calls based on controller bus type
authorEric Farman <farman@linux.vnet.ibm.com>
Thu, 21 Nov 2013 03:36:26 +0000 (22:36 -0500)
committerJán Tomko <jtomko@redhat.com>
Thu, 21 Nov 2013 09:38:53 +0000 (10:38 +0100)
commit6f22f95f77cd0a0d3be5d561e49813db24a97da6
tree882a92c38872e532cae674870d05859147f5e83a
parent271eb0584b789c550187e85bdc9fa09f44a37352
qemu: Separate calls based on controller bus type

For systems without a PCI bus, attaching a SCSI controller fails:

  [root@xxxxxxxx ~]# cat controller.xml
  <controller type='scsi' model='virtio-scsi' index='0' />
  [root@xxxxxxxx ~]# virsh attach-device guest01 controller.xml
  error: Failed to attach device from controller.xml
  error: XML error: No PCI buses available

A similar problem occurs with the detach of a controller:

  [root@xxxxxxxx ~]# virsh detach-device guest01 controller.xml
  error: Failed to detach device from controller.xml
  error: operation failed: controller scsi:0 not found

The qemuDomainXXtachPciControllerDevice routines made assumptions
that any caller had a PCI bus.  These routines now selectively calls
PCI functions where necessary, and assigns the device information
type to one appropriate for the bus in use.

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c