Bug 1004596 - need give more suitable error info when changing pci-bridge address function to '0x8'
Summary: need give more suitable error info when changing pci-bridge address function ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1207751 1340726
TreeView+ depends on / blocked
 
Reported: 2013-09-05 02:31 UTC by EricLee
Modified: 2016-05-30 07:44 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.2.17-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:43:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description EricLee 2013-09-05 02:31:00 UTC
Description of problem:
need give more suitable error info when changing pci-bridge address function to '0x8' 

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-2.el7.x86_64
libvirt-1.1.1-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. define a guest will machine='q35'.
2. edit guest xml:
from:
"    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
"
to
"    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x8'/>
    </controller>
"

and save.

Actual results:
# virsh edit test1
error: internal error: Insufficient specification for PCI address
Failed. Try again? [y,n,f,?]:

Expected results:
# virsh edit test1
error: internal error: Invalid PCI address 0000:01:01.8. function must be <= 7
Failed. Try again? [y,n,f,?]:

Additional info:

Comment 6 hongming 2015-07-14 06:24:12 UTC
hi Jaroslav

The bug has had rhel-7.2.0+ flag, so it will be fixed with a new build in rhel7.2 , right? thanks.

Comment 7 Laine Stump 2015-07-22 16:06:02 UTC
Fix posted upstream:

  https://www.redhat.com/archives/libvir-list/2015-July/msg00894.html

It turns out that just getting rid of the code that outputs the useless error message allows existing code to log the proper error.

Comment 8 Laine Stump 2015-07-25 19:27:23 UTC
V1 had a problem, so I posted V2:

https://www.redhat.com/archives/libvir-list/2015-July/msg00894.html

Comment 10 Laine Stump 2015-08-08 22:47:38 UTC
The fix has been pushed upstream:

commit f8fe8f03455783afcd62d79db7ce4120f514c629
Author: Laine Stump <laine@laine.org>
Date:   Wed Jul 22 11:59:00 2015 -0400

    conf: more useful error message when pci function is out of range

Comment 13 Shanzhi Yu 2015-08-20 10:55:13 UTC
Verify this bug with libvirt-1.2.17-5.el7.x86_64

1. Try to define a guest with pci-bridge in xml 

....
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x8'/>
    </controller>
...

# virsh define r7.xml 
error: Failed to define domain from r7.xml
error: XML error: Invalid PCI address function=0x8, must be <= 7

# virt-xml-validate r7.xml 
Relax-NG validity error : Extra element devices in interleave
r7.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content
r7.xml fails to validate

Comment 15 errata-xmlrpc 2015-11-19 05:43:44 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/RHBA-2015-2202.html


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