Change in vdsm[master]: hostdev: get is_assignable from libvirt when available
mpolednik at redhat.com
mpolednik at redhat.com
Mon Apr 18 14:39:33 UTC 2016
Martin Polednik has uploaded a new change for review.
Change subject: hostdev: get is_assignable from libvirt when available
......................................................................
hostdev: get is_assignable from libvirt when available
Change-Id: I80560c0202a494afd15795156d618104b644c4de
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M lib/vdsm/hostdev.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/56299/1
diff --git a/lib/vdsm/hostdev.py b/lib/vdsm/hostdev.py
index d5a563c..924984d 100644
--- a/lib/vdsm/hostdev.py
+++ b/lib/vdsm/hostdev.py
@@ -179,6 +179,18 @@
address = physfn.find('address')
params['physfn'] = pci_address_to_name(**address.attrib)
+ if params['capability'] == 'pci':
+ is_assignable = None
+
+ if physfn is not None:
+ if physfn.attrib['type'] in ('pci-bridge', 'cardbus-bridge'):
+ is_assignable = 'false'
+
+ if is_assignable is None:
+ is_assignable = str(_pci_header_type(name) == 0).lower()
+
+ params['is_assignable'] = is_assignable
+
iommu_group = caps.find('iommuGroup')
if iommu_group is not None:
params['iommu_group'] = iommu_group.attrib['number']
--
To view, visit https://gerrit.ovirt.org/56299
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80560c0202a494afd15795156d618104b644c4de
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