Change in vdsm[master]: vdsm: add check for hostdev passthrough to caps

danken at redhat.com danken at redhat.com
Thu Sep 4 22:36:46 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: vdsm: add check for hostdev passthrough to caps
......................................................................


Patch Set 5: Code-Review-1

(4 comments)

http://gerrit.ovirt.org/#/c/30471/5//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2014-07-19 01:31:13 +0200
Line 4: Commit:     Martin Polednik <mpolednik at redhat.com>
Line 5: CommitDate: 2014-09-03 14:33:20 +0200
Line 6: 
Line 7: vdsm: add check for hostdev passthrough to caps
vdsm prefix is superfluous.
Line 8: 
Line 9: Not perfectly accurate source but the support for passthrough can be
Line 10: obtained through cmdline of dmesg, or systemd journal in fedora.
Line 11: This indicates whether user *wanted* to enable the support, not if


Line 8: 
Line 9: Not perfectly accurate source but the support for passthrough can be
Line 10: obtained through cmdline of dmesg, or systemd journal in fedora.
Line 11: This indicates whether user *wanted* to enable the support, not if
Line 12: it is fully supported by hardware and/or configuration.
isn't there a saner way, by reading sysfs?
Line 13: 
Line 14: Change-Id: I789f93679740e87b2f5a88351261bc58852990d4


http://gerrit.ovirt.org/#/c/30471/5/vdsm/caps.py
File vdsm/caps.py:

Line 254:     return False
Line 255: 
Line 256: 
Line 257: def _has_iommu_support():
Line 258:     with open('/proc/cmdline', 'r') as fd:
the return value of open() is a file, not a file descriptor. So 'fd' is a misleading name.
Line 259:         cmdline = fd.readline()
Line 260:         if _has_iommu_support_in_cmdline(cmdline):
Line 261:             return 'yes'
Line 262:         else:


Line 257: def _has_iommu_support():
Line 258:     with open('/proc/cmdline', 'r') as fd:
Line 259:         cmdline = fd.readline()
Line 260:         if _has_iommu_support_in_cmdline(cmdline):
Line 261:             return 'yes'
better return plane booleans
Line 262:         else:
Line 263:             return 'no'
Line 264: 
Line 265: 


-- 
To view, visit http://gerrit.ovirt.org/30471
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I789f93679740e87b2f5a88351261bc58852990d4
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list