Martin Polednik has uploaded a new change for review. Change subject: hostdev: display directed-passthrough status in caps ......................................................................
hostdev: display directed-passthrough status in caps Whether the underlying host supports directed passthrough can be read via sysfs /sys/class/iommu, where support would be indicated by pressence of dma remapping indicator - dmarX (where X >= 0). This patch exposes this fact in caps via directedPassthrough key. Change-Id: I159f49db4fdbfd347753b2c97c5f75b694ac9460 Signed-off-by: Martin Polednik <mpoled...@redhat.com> --- M vdsm/caps.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/37701/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index cb60e34..eee1032 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -596,6 +596,10 @@ return selinux +def _getDirectedPassthrough(): + return bool(len(os.listdir('/sys/class/iommu'))) + + def get(): targetArch = getTargetArch() @@ -688,6 +692,8 @@ caps['liveMerge'] = str(getLiveMergeSupport()).lower() caps['kdumpStatus'] = _getKdumpStatus() + caps['directedPassthrough'] = str(_getDirectedPassthrough()) + return caps -- To view, visit http://gerrit.ovirt.org/37701 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I159f49db4fdbfd347753b2c97c5f75b694ac9460 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <mpoled...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches