Bug 736437
Summary: | pci_stub driver is still used for PCI device after virsh destroy | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Miroslav Vadkerti <mvadkert> | |
Component: | libvirt | Assignee: | Eric Blake <eblake> | |
Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.2 | CC: | ajia, dallan, dyuan, ebenes, eblake, jyang, mzhan, rwu, veillard, weizhan | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 740686 (view as bug list) | Environment: | ||
Last Closed: | 2011-10-14 21:48:39 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 740686 | |||
Bug Blocks: |
Description
Miroslav Vadkerti
2011-09-07 17:10:45 UTC
I'll take a look into this next week once I've got access to some hardware to try and reproduce it I think I have reproduced the bug using just hot-plug/hot-unplug on my local machine (no need to even stop the domain), but I still need to understand the code better to understand what I will be patching. It should be easy enough to fix, though, once I understand what the code is already doing with pci-stub management. Actually, I'm starting to think that this behavior is intentional. Libvirt provides the virNodeDeviceReAttach API (exposed via 'virsh nodedev-reattach) as a way to tell libvirt to release a pci device back to the host. In your particular example, you want to run: virsh nodedev-reattach pci_0000_03_10_0 which will fail if any domains are configured to use the device, but which should succeed at restoring the driver back to igbvf if libvirt truly is no longer using the device. Creating a domain with a passthrough device without first calling virNodeDeviceDettach (yes, that spelling error is in the public API) means that libvirt may automatically attempt the detach, but there is no automatic counterpart for a reattach. I suppose that it might be possible to request that libvirt add automatic reattach since it already has automatic detach, but that should be discussed on the upstream libvirt list, and I'm not sure it is worth it. So for now, I'm inclined to close this bug (automatic reattach) as not a bug, after waiting a day or so for any further comments. Meanwhile, I will create a new bug about the fact that 'virsh nodedev-*' is completely undocumented. I think the documentation aspect can be cleaned up in time for RHEL 6.2, but it does not have the same impact as this bug. (In reply to comment #10) > Meanwhile, I will create a new bug about the fact that 'virsh nodedev-*' is > completely undocumented. I think the documentation aspect can be cleaned up in > time for RHEL 6.2, but it does not have the same impact as this bug. doc issue tracked in bug 740686 Teaching libvirt to auto-reassign devices back to the kernel after removing them from guests goes along nicely with the concept of managed devices, but that is a feature request, not a bug fix. Moving this RFE to RHEL 6.3; the Common Criteria list agreed that while the current behavior of requiring manual 'virsh nodedev-reattach' is not optimal, it does work and there is no security risk that needs to be addressed in the 6.2 timeframe. I'm closing this as a duplicate; the patch for bug 736214 solves the issue for all <hostdev managed=1>. *** This bug has been marked as a duplicate of bug 736214 *** |