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 1363627 - Provide proper error messages when hot-plugging devices into a not hot-pluggable pci controller
Summary: Provide proper error messages when hot-plugging devices into a not hot-plugga...
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: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-03 08:59 UTC by Yang Yang
Modified: 2016-11-03 18:51 UTC (History)
3 users (show)

Fixed In Version: libvirt-2.0.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:51:22 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-08-03 08:59:22 UTC
Description of problem:
I hot-plug devices into a not hot-pluggable pci controller, such as
pcie-root, dmi-to-pci-bridge, pxb-pcie. The error messages confuse
me, like this:

# virsh attach-device vm1-q35 nic.xml
error: Failed to attach device from nic.xml
error: internal error: PCI bus is not compatible with the device at 0000:01:1f.0. Device requires hot-plug capability, which is not provided by bus 0000:01

If we're sure they do not support hotplug, we should
provide proper error message like "pxb-pcie does not have hotpluggable slot"

Version-Release number of selected component (if applicable):
libvirt-2.0.0-4.el7.x86_64
qemu-kvm-rhev-2.6.0-18.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start vm with pcie-root -- dmi-to-pci-birdge -- pci-bridge
<controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>

2. hot-plug 1 nic into dmi-to-pci-bridge
# virsh attach-device vm1-q35 nic.xml
error: Failed to attach device from nic.xml
error: internal error: PCI bus is not compatible with the device at 0000:01:1f.0. Device requires hot-plug capability, which is not provided by bus 0000:01

# cat nic.xml
<interface type='network'>
      <source network='default' bridge='virbr0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1f' function='0x0'/>
    </interface>

Actual results:
The error messages confuse me

Expected results:
Provide proper error messages when hotplugging devices into a not hot-pluggable pci controller, such as pcie-root, dmi-to-pci-bridge, pxb-pcie.

Additional info:

Comment 2 Laine Stump 2016-08-10 15:06:24 UTC
Fix pushed upstream:

commit 10031fe5f218fe0acbf873a3063ce42a02fa83d9
Author: Laine Stump <laine>
Date:   Fri Aug 5 21:19:27 2016 -0400

    conf: improve error log when PCI devices don't match requested controller

Comment 5 Yang Yang 2016-08-15 09:03:14 UTC
Verified on libvirt-2.0.0-5.el7.x86_64

1. Hotplug device into dmi-to-pci-bridge
# virsh attach-disk vm1-q35 /mnt/nfs2/virtio1.img vdb --subdriver qcow2 --targetbus virtio --address pci:0.1.1f.0
error: Failed to attach disk
error: internal error: The device at PCI address 0000:01:1f.0 requires hotplug capability, but the PCI controller with index='1' doesn't support hotplug

2. Hotplug device into pcie-root
 # virsh attach-disk vm1-q35 /mnt/nfs2/virtio1.img vdb --subdriver qcow2 --targetbus virtio --address pci:0.0.1f.0
error: Failed to attach disk
error: internal error: The device at PCI address 0000:00:1f.0 cannot be plugged into the PCI controller with index='0'. It requires a controller that accepts a standard PCI device.
	 
3. Hotplug device into upstream port 
# virsh attach-disk vm1-q35 /mnt/nfs2/virtio1.img vdb --subdriver qcow2 --targetbus virtio --address pci:0.4.1f.0
error: XML error: The device at PCI address 0000:04:1f.0 cannot be plugged into the PCI controller with index='4'. It requires a controller that accepts a standard PCI device.

4. Hotplug device into pxb-pcie
# virsh attach-disk vm1-q35-pxb /mnt/nfs2/virtio2.img vdb --subdriver qcow2 --address pci:0.3.0.0
error: Failed to attach disk
error: XML error: The device at PCI address 0000:03:00.0 cannot be plugged into the PCI controller with index='3'. It requires a controller that accepts a standard PCI device.

I got error when hotplugging devices into a not hot-pluggable bus. For the hottpluggable bus, e.g. root-port and downstream-port, I got error like above as well. I have a separate bug1337490 to track.

Comment 7 errata-xmlrpc 2016-11-03 18:51:22 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.