Dan Kenigsberg has uploaded a new change for review. Change subject: Revert "hostdev: don't implicitly reattach devices" ......................................................................
Revert "hostdev: don't implicitly reattach devices" This reverts commit 2bdcf4f99e4723f08886 as SR-IOV feature depends on implicit reattchement of VFs. Commit 74ac384510b makes sure that the reversal would affect only SRIOV NICs and not generic host devices. Change-Id: Ia46068b4905d480e50957d3611bd9ae74e45a77d Signed-off-by: Dan Kenigsberg <dan...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/56013/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 08a20be..c52e509 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -1257,6 +1257,16 @@ cleanup_guest_socket(self._guestSocketFile) + def _reattachHostDevices(self): + # reattach host devices + for dev_name, _ in self._host_devices(): + self.log.debug('Reattaching device %s to host.' % dev_name) + try: + hostdev.reattach_detachable(dev_name) + except hostdev.NoIOMMUSupportException: + self.log.exception('Could not reattach device %s back to host ' + 'due to missing IOMMU support.') + def _host_devices(self): for device in self._devices[hwclass.NIC][:]: if device.is_hostdevice: @@ -1678,6 +1688,7 @@ self._cleanupFloppy() self._cleanupGuestAgent() cleanup_guest_socket(self._qemuguestSocketFile) + self._reattachHostDevices() self._cleanupStatsCache() numa.invalidateNumaCache(self) for con in self._devices[hwclass.CONSOLE]: -- To view, visit https://gerrit.ovirt.org/56013 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia46068b4905d480e50957d3611bd9ae74e45a77d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <dan...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches