Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 747619 - Host PCI device's original states are not honored anymore after deamon is restarted
Host PCI device's original states are not honored anymore after deamon is res...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Osier Yang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-20 10:17 EDT by Osier Yang
Modified: 2012-06-20 02:35 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:35:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Osier Yang 2011-10-20 10:17:40 EDT
Description of problem:
To support "managed" mode of host PCI device, we record the original
states (unbind_from_stub, remove_slot, and reprobe) so that could
reattach the device to host with original driver. But there is no XML
for theses attrs, and thus after daemon is restarted, we lose the
original states. It's easy to reproduce:

    1) virsh start domain
    2) virsh attach-device dom hostpci.xml (in 'managed' mode)
    3) service libvirtd restart
    4) virsh destroy domain

    You will see the device won't be bound to the original driver
if there was one.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 5 Alex Jia 2011-10-28 05:17:54 EDT
Osier, if virsh attach-device support --persistent option, whether this issue can be resolved?
Comment 6 Alex Jia 2011-10-28 05:30:50 EDT
I can reproduce this issue on rhel6.2 with libvirt-0.9.4-14.el6_x86_64, although managed mode is yes, the device can't be returned to host after destroying or shutting down the guest.
Comment 8 Osier Yang 2011-11-22 04:32:48 EST
patch committed to upstream.
Comment 9 Osier Yang 2012-01-09 03:35:43 EST
commit d84b36263c5c54df8ebfaebbe099afec78c14fac
Author: Osier Yang <jyang@redhat.com>
Date:   Thu Oct 20 17:50:10 2011 +0800

    qemu: Restore the original states of PCI device when restarting daemon
    
    To support "managed" mode of host PCI device, we record the original
    states (unbind_from_stub, remove_slot, and reprobe) so that could
    reattach the device to host with original driver. But there is no XML
    for theses attrs, and thus after daemon is restarted, we lose the
    original states. It's easy to reproduce:
    
        1) virsh start domain
        2) virsh attach-device dom hostpci.xml (in 'managed' mode)
        3) service libvirtd restart
        4) virsh destroy domain
    
        You will see the device won't be bound to the original driver
    if there was one.

    ......
Comment 11 weizhang 2012-01-10 04:11:20 EST
verify pass on
libvirt-0.9.9-1.el6.x86_64
kernel-2.6.32-225.el6.x86_64
qemu-kvm-0.12.1.2-2.213.el6.x86_64

After restart libvirtd and destroy guest, the pci device will return to host
Comment 12 Osier Yang 2012-05-04 06:03:49 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.
Comment 14 errata-xmlrpc 2012-06-20 02:35:26 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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