Bug 1132900
Summary: | Failed to start guest if all slots of one bus have been specified by adding pci devices | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, eskultet, honzhang, jtomko, lcheng, mzhan, rbalakri |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:47:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Luyao Huang
2014-08-22 08:54:55 UTC
Fixed upstream: commit 5d6904b9919cd15a5b079d4523b3bfd79f7b0726 Author: Erik Skultety <eskultet> Date: Fri Jan 23 13:17:42 2015 +0100 qemu: Fix auto-adding PCI bridge when all slots are reserved Commit 93c8ca tried to fix the issue with auto-adding of a PCI bridge controller, but didn't work properly in all scenarios. This patch provides a better fix of the issue when all slots on a PCI bus are reserved by devices with user specified addresses and no additional bridges need to be created. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132900 v1.2.12-rc1-21-g5d6904b Verified as below: [root@localhost ~]# rpm -q libvirt libvirt-1.2.14-1.el7.x86_64 1. Attach more than 32 pci devices,then start guest.(expected) [root@localhost ~]# for i in `seq 1 33`; do virsh attach-device r71 net1.xml --config; done Device attached successfully Device attached successfully ... Device attached successfully Device attached successfully [root@localhost ~]# virsh dumpxml r71 | grep "<interface" |wc -l 33 [root@localhost ~]# virsh dumpxml r71 | grep pci-bridge -b3 1853- <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/> 1935- </controller> 1953- <controller type='pci' index='0' model='pci-root'/> 2009: <controller type='pci' index='1' model='pci-bridge'> 2066- <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/> 2148- </controller> 2166- <controller type='ide' index='0'> [root@localhost ~]# [root@localhost ~]# virsh start r71 Domain r71 started 2. All slots are reserved as endpoint, libvirt will fail to create a pci bridge.(expected) ... <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default'/> <model type='virtio'/> </interface> ... [root@localhost ~]# virsh edit r71 error: unsupported configuration: failed to create PCI bridge on bus 1: too many devices with fixed addresses Failed. Try again? [y,n,i,f,?]: 3. Leave 1 available slot, then hot-pulg pci devices, we just attached one devcie.(expected) [root@localhost ~]# virsh start r71 Domain r71 started [root@localhost ~]# virsh attach-device r71 net1.xml Device attached successfully [root@localhost ~]# virsh attach-device r71 net1.xml error: Failed to attach device from net1.xml error: internal error: No more available PCI slots We can get expected results, changed to Verified. Thanks for your information, I'll validate that bug after changing to ON_QA. But, I found your patch has been merged into below version,please double check it. [root@localhost ~]# rpm -q libvirt libvirt-1.2.15-1.el7.x86_64 1. add below wrong pci bridge controller, the index is equal to bus of itself <controller type='pci' index='2' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </controller> [root@localhost ~]# virsh edit r71 error: unsupported configuration: failed to create PCI bridge on bus 2: too many devices with fixed addresses Failed. Try again? [y,n,i,f,?]: 2. add below wrong bridge, the index is less than its bus <controller type='pci' index='3' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x04' slot='0x01' function='0x0'/> </controller> [root@localhost ~]# virsh edit r71 error: unsupported configuration: failed to create PCI bridge on bus 4: too many devices with fixed addresses Failed. Try again? [y,n,i,f,?]: Thanks. Yes, the patch (by Erik Skultety) I mentioned in bug 1004593 was in libvirt-1.2.13-1.el7 along with the patch mentioned comment 3. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |