Bug 1609087 - Failed to define q35 guest with 'none' video type when pci address 0000:00:01.0 is used by other device
Summary: Failed to define q35 guest with 'none' video type when pci address 0000:00:01...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-27 01:22 UTC by yafu
Modified: 2018-10-30 09:59 UTC (History)
7 users (show)

Fixed In Version: libvirt-4.5.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:58:28 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 None None None 2018-10-30 09:59:31 UTC

Description yafu 2018-07-27 01:22:27 UTC
Description of problem:
Failed to define q35 guest with 'none' video type when pci address 0000:00:01.0 is used by other device

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

How reproducible:
100%

Steps to Reproduce:
1.Prepare a q35 guest xml with 'none' video type and pci address 0000:00:01.0 is used by other device:
#cat guest.xml
...
 <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
...
  <video>
      <model type='none'/>
    </video>


2.#Define guest:
#virsh define guest.xml
error: Failed to define domain from guest.xml
error: internal error: Cannot automatically add a new PCI bus for a device with connect flags 00


Actual results:
Failed to define q35 guest with 'none' video type when pci address 0000:00:01.0 is used by other device


Expected results:
Should define q35 guest with 'none' video type when pci address 0000:00:01.0 is used by other device successfully.

Additional info:
1.The pc guest with 'none' video type has no pci address, but q35 guest with 'none' video type will use pci address 0000:00:01.0. It should be consistent between pc guest and q35 guest.

Comment 2 Erik Skultety 2018-07-31 05:46:10 UTC
Patch posted upstream:
https://www.redhat.com/archives/libvir-list/2018-July/msg02070.html

Comment 4 Erik Skultety 2018-07-31 08:35:21 UTC
Fixed upstream by:
commit e9024b0cec3a66ac11784034bb62abe8ec7b46a1
Refs: v4.6.0-rc2-1-ge9024b0cec
Author:     Erik Skultety <eskultet@redhat.com>
AuthorDate: Mon Jul 30 16:33:33 2018 +0200
Commit:     Erik Skultety <eskultet@redhat.com>
CommitDate: Tue Jul 31 07:42:43 2018 +0200

    qemu: Exempt video model 'none' from getting a PCI address on Q35

    Commit d48813e8 made sure we wouldn't get one for i440fx, but not for Q35
    machine type. If the primary video didn't get the assumed 0:0:1.0 PCI
    address, the evaluation then failed with: "Cannot automatically add a
    new PCI bus for a device with connect flags 00"

    https://bugzilla.redhat.com/show_bug.cgi?id=1609087
    Signed-off-by: Erik Skultety <eskultet@redhat.com>

Comment 7 Lili Zhu 2018-08-14 09:21:12 UTC
Verify this bug with 
libvirt-4.5.0-6.el7.x86_64

Steps are as follows:
1.Prepare a q35 guest xml with 'none' video type and pci address 0000:00:01.0 is used by other device:
#cat test.xml
....
  <os>
    <type arch='x86_64' machine='pc-q35-rhel7.6.0'>hvm</type>
    <boot dev='hd'/>
  </os>
....
<controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
....
  <video>
      <model type='none'/>
    </video>

2. Define the guest xml
# virsh define test.xml 
Domain test defined from test.xml

3. start the guest 
# virsh start test 
Domain test started

Comment 8 Lili Zhu 2018-08-14 10:58:14 UTC
Following Comment 7

4. check the "none" video device xml
# virsh dumpxml test |grep "<video" -A3
    <video>
      <model type='none'/>
      <alias name='video0'/>
    </video>

As the guest with the above xml can be started successfully, and the video model 'none' not getting a PCI address, mark it as verified

Comment 10 errata-xmlrpc 2018-10-30 09:58:28 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.