]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Need to assign PCI address to vhost-scsi
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Dec 2017 11:30:31 +0000 (06:30 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 13 Dec 2017 20:37:30 +0000 (15:37 -0500)
commit10c73bf18a8538376641c22142c18a255426ef3a
tree2b26a46acb8b5d34d61a8a9658bedf89b96bfa5e
parent9f8778dfca0a92572d9c00b0ed73b65a18a556d5
qemu: Need to assign PCI address to vhost-scsi

Commit id '70249927b' neglected to cover this case because the test
had taken the "shortcut" to already add the <address>; however, when
the PCI address assignment code was adjusted by commit id '70249927'
the vhost-scsi (VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) wasn't
covered thus returning a 0 for pciFlags. So I altered the tests too
to make sure it doesn't happen again.

Previously the qemuxml2xmloutdata was a softlink to the source
qemuxml2argvdata, so I unlinked and recreated the output file to
force generation of the adddress. Without the test changes, an
address generation returns:

    libvirt: Domain Config error : internal error: Cannot automatically
    add a new PCI bus for a device with connect flags 00

if an address was supplied in the test, a restart of libvirtd or
edit of a guest would display the following opaque message:

    warning : qemuDomainCollectPCIAddress:1237 :
    qemuDomainDeviceCalculatePCIConnectFlags() thinks that the device
     with PCI address 0000:00:09.0 should not have a PCI address

where the address is related to the guest PCI address provided.
src/qemu/qemu_domain_address.c
tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-ccw.xml
tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pci.xml
tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-ccw.xml [changed from symlink to file mode: 0644]
tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pci.xml [changed from symlink to file mode: 0644]