RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1339900 - Tiny issue: PCI controller's index cannot be = bus
Summary: Tiny issue: PCI controller's index cannot be = bus
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-26 06:08 UTC by Yang Yang
Modified: 2016-11-03 18:45 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.3.5-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:45:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Yang Yang 2016-05-26 06:08:46 UTC
Description of problem:
When setting PCI controller's index = bus, define vm failed
I got error like this
# virsh define vm1-test.xml
error: Failed to define domain from vm1-test.xml
error: unsupported configuration: PCI controller at index 2 (0x02) has bus='0x02', but bus must be <= index

PCI controller's index cannot be = bus, so the error message should be updated like this
# virsh define vm1-test.xml
error: Failed to define domain from vm1-test.xml
error: unsupported configuration: PCI controller at index 2 (0x02) has bus='0x02', but bus must be < index

Version-Release number of selected component (if applicable):
libvirt-1.3.4-1.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. set pci-bridge controller's index=2, bus=0x02
<controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0c' function='0x0'/>
    </controller>

# virsh define vm1-test.xml
error: Failed to define domain from vm1-test.xml
error: unsupported configuration: PCI controller at index 2 (0x02) has bus='0x02', but bus must be <= index


Actual results:
define vm fails when setting pci controller's index=bus

Expected results:
Update error message like this
# virsh define vm1-test.xml
error: Failed to define domain from vm1-test.xml
error: unsupported configuration: PCI controller at index 2 (0x02) has bus='0x02', but bus must be < index


Additional info:

Comment 1 Ján Tomko 2016-05-26 07:23:59 UTC
Proposed upstream patch:
https://www.redhat.com/archives/libvir-list/2016-May/msg01724.html

Comment 2 Andrea Bolognani 2016-05-26 14:25:56 UTC
The fix has been merged upstream.

commit c7289cf3b59aacd08dbc9047eda52c03b2837653
Author: Andrea Bolognani <abologna>
Date:   Mon May 23 18:00:36 2016 +0200

    qemu: Fix error message when PCI bridge has index <= bus
    
    Commit ff2126225df0 changed the error message to be more
    detailed about the failure at hand; however, while the new
    error message claims that "bus must be <= index", the error
    message is displayed if "idx <= addr->bus", ie. when bus
    is larger than or *equal to* index.
    
    Change the error message to report the correct constraint,
    and format it in a way that mirrors the check exactly to
    make it clearer to people reading the code. The new error
    message reads "index must be larger than bus".
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1339900

v1.3.4-502-gc7289cf

Comment 4 Han Han 2016-08-18 06:55:02 UTC
Verify it on libvirt-2.0.0-5.el7.x86_64
Try to edit a domain's xml to:
# virsh edit smart 
...
 <controller type='pci' index='0' model='pci-root'/>
 <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0b' function='0x0'/>
    </controller>
...
error: unsupported configuration: PCI controller at index 1 (0x01) has bus='0x01', but index must be larger than bus
Failed. Try again? [y,n,i,f,?]: 

Try to create a domain with the xml above:
# virsh create /tmp/smart
error: Failed to create domain from /tmp/smart
error: unsupported configuration: PCI controller at index 1 (0x01) has bus='0x01', but index must be larger than bus

Comment 6 errata-xmlrpc 2016-11-03 18:45:55 UTC
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/RHSA-2016-2577.html


Note You need to log in before you can comment on or make changes to this bug.