Description of problem: any use of a non-0 function on a slot should be an error unless function 0 of that slot is also used Version-Release number of selected component (if applicable): libvirt-daemon-3.2.0-14.el7.x86_64 qemu-kvm-rhev-2.9.0-12.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.start a vm with 2 virtio disks using the xml: <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/RHEL-7.4-x86_64-latest.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/b.img'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/> </disk> in the guest,only vdb uses the 08 slot and the function is non-0,no device uses the 08 slot with function=0 [root@lmen1 ~]# virsh start test Domain test started [root@lmen1 ~]# virsh dumpxml test | grep 0x08 <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/> 2.check disks in guest, cannot find disk vdb in the guest, #lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 252:0 0 10G 0 disk ├─vda1 252:1 0 1G 0 part /boot └─vda2 252:2 0 9G 0 part ├─rhel-root 253:0 0 8G 0 lvm / └─rhel-swap 253:1 0 1G 0 lvm [SWAP] Actual results: can start the guest,but can not find the disk Expected results: output some error info Additional info:
Bug 1350391 has some context for this.
We have all the info needed to do this when we build the table of in-use PCI addresses before auto-assigning PCI addresses to devices that don't yet have an address.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.