Change in vdsm[master]: hostdev: only detect IOMMU group for PCI devices
mpolednik at redhat.com
mpolednik at redhat.com
Mon Apr 13 13:28:24 UTC 2015
Martin Polednik has uploaded a new change for review.
Change subject: hostdev: only detect IOMMU group for PCI devices
......................................................................
hostdev: only detect IOMMU group for PCI devices
When assigning USB and/or SCSI devices, the detach function is called
to fetch attributes of the device. Assigning IOMMU group caused
KeyError in this case as there are no IOMMU groups on usb/scsi buses.
Change-Id: I4aa14738c52013c4f0247544c2d81d1bebaced4b
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M vdsm/hostdev.py
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/39807/1
diff --git a/vdsm/hostdev.py b/vdsm/hostdev.py
index 08d4974..675e381 100644
--- a/vdsm/hostdev.py
+++ b/vdsm/hostdev.py
@@ -170,9 +170,8 @@
def detach_detachable(device_name):
libvirt_device, device_params = _get_device_ref_and_params(device_name)
- iommu_group = device_params['iommu_group']
-
if CAPABILITY_TO_XML_ATTR[device_params['capability']] == 'pci':
+ iommu_group = device_params['iommu_group']
supervdsm.getProxy().appropriateIommuGroup(iommu_group)
libvirt_device.detachFlags(None)
@@ -182,9 +181,8 @@
def reattach_detachable(device_name):
libvirt_device, device_params = _get_device_ref_and_params(device_name)
- iommu_group = device_params['iommu_group']
-
if CAPABILITY_TO_XML_ATTR[device_params['capability']] == 'pci':
+ iommu_group = device_params['iommu_group']
supervdsm.getProxy().rmAppropriateIommuGroup(iommu_group)
libvirt_device.reAttach()
--
To view, visit https://gerrit.ovirt.org/39807
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4aa14738c52013c4f0247544c2d81d1bebaced4b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
More information about the vdsm-patches
mailing list