Bug 1367238 - libvirt allow set busNr and numa node for a pci-bridge but won't use it
Summary: libvirt allow set busNr and numa node for a pci-bridge but won't use it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-16 02:26 UTC by Luyao Huang
Modified: 2018-10-30 09:49 UTC (History)
4 users (show)

Fixed In Version: libvirt-4.3.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:49:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1358994 None ASSIGNED Reject to use same busNr to 2 pxb controllers 2019-03-04 21:09:44 UTC

Internal Links: 1358994

Description Luyao Huang 2016-08-16 02:26:36 UTC
Description of problem:
libvirt allow set busNr and numa node for a pci-bridge but won't use it

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

How reproducible:
100%

Steps to Reproduce:
1. prepare a guest have a xml like this:

    <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1' busNr='254'>
        <node>1</node>
      </target>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <controller type='ide' index='0'>

2. start guest:

# virsh start r7-lhuang
Domain r7-lhuang started

3. check qemu cmdline:

# ps aux|grep qemu

-device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 

4. check active xml:

# virsh dumpxml r7-lhuang
...
    <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1' busNr='254'>
        <node>1</node>
      </target>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
...


Actual results:
Libvirt still show the numa node and busNr in active guest xml but didn't use it to build qemu cmd line for pci-bridge (this is a negative test case since pci-bridge won't use these element).

Expected results:
maybe report error during start guest ?

Additional info:

Comment 3 Laine Stump 2018-03-09 20:16:27 UTC
I just realized this was fixed in commit 5bd876, which will be in libvirt-4.2.0

commit 5bd8764ee087f8fe417db8d80d51e2d4cd57dc6e
Author: Andrea Bolognani <abologna@redhat.com>
Date:   Tue Feb 20 15:12:37 2018 +0100

    qemu: Validate PCI controller options (busNr)

Comment 5 Meina Li 2018-07-12 06:53:51 UTC
Verified on bug 1483816.

Comment 7 errata-xmlrpc 2018-10-30 09:49:43 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://access.redhat.com/errata/RHSA-2018:3113


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