Bug 499561 - libvirt does not automatically re-attach an assigned device in the host after guest shutdown
Summary: libvirt does not automatically re-attach an assigned device in the host after...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 11
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mark McLoughlin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-05-07 08:11 UTC by Mark McLoughlin
Modified: 2009-09-04 04:09 UTC (History)
6 users (show)

Fixed In Version: 0.6.2-17.fc11
Clone Of:
Environment:
Last Closed: 2009-09-04 04:09:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark McLoughlin 2009-05-07 08:11:00 UTC
See:

https://fedoraproject.org/w/index.php?title=QA:Testcase_Virtualization_KVM_PCI_Device_Assignment_assign_using_libvirt

If you attach a device to a guest in "managed" mode, then libvirt automatically detaches the device from the host before starting the guest, but it doesn't automatically do it when the guest shuts down

This would be particularly noticeable if you were using virt-manager - you'd have to drop to the shell and do "virsh reattach" before you can use the device in the guest again.

Granted, libvirtd might not even be running when the guest dies, but is there anything we can do here for the common case?

Comment 1 Daniel Berrangé 2009-05-07 09:12:43 UTC
Agreed, it should reset the device after guest shutdown and then re-attach the host OS drivers. 

We should assume libvirtd is running at time of guest shutdown. Any scenario where it wouldn't be running is a bug.

Comment 2 Daniel Berrangé 2009-05-07 09:15:11 UTC
NB, we need to be careful in the reset to avoid outstanding DMA ops clobbering the host OS memory - see this note from xen

 http://xenbits.xensource.com/xen-unstable.hg?rev/026957d523f9

This might mean we need KVM todo a FLR in the guest cleanup path ?

Comment 3 Bug Zapper 2009-06-09 15:17:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Mark McLoughlin 2009-08-14 07:44:47 UTC
Patch committed upstream:

  http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=4035152a87

Comment 5 Fedora Update System 2009-08-19 16:35:03 UTC
libvirt-0.6.2-16.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/libvirt-0.6.2-16.fc11

Comment 6 Fedora Update System 2009-08-20 20:58:22 UTC
libvirt-0.6.2-17.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8790

Comment 7 Fedora Update System 2009-09-04 04:09:23 UTC
libvirt-0.6.2-17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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