Change in vdsm[master]: hostdev: fix detection for ppc64le
mpolednik at redhat.com
mpolednik at redhat.com
Tue Dec 15 13:11:49 UTC 2015
Martin Polednik has uploaded a new change for review.
Change subject: hostdev: fix detection for ppc64le
......................................................................
hostdev: fix detection for ppc64le
x86_64 detects the state of hostdev support by looking at 2 places:
* /sys/class/iommu to determine the status of DMA remapping,
* /sys/kernel/iommu_groups to determine that at least some IOMMU groups
exist.
The issue in ppc64le is related to the first place - /sys/class/iommu
is newer interface and may not be supported on all kernels. 7.2 on
x86_64 seems to be updated enough that we can keep the detection, but
for ppc64le we cannot use it.
Change-Id: I314c8bda6a6831bf334e08085e8bf2fc4874aced
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M vdsm/caps.py
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/50525/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index 209158b..d5ba242 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -577,8 +577,11 @@
def _getHostdevPassthorughSupport():
try:
- return (bool(len(os.listdir('/sys/class/iommu'))) and
- bool(len(os.listdir('/sys/kernel/iommu_groups'))))
+ if platform.machine() in Architecture.POWER:
+ return (bool(len(os.listdir('/sys/kernel/iommu_groups'))))
+ else:
+ return (bool(len(os.listdir('/sys/class/iommu'))) and
+ bool(len(os.listdir('/sys/kernel/iommu_groups'))))
except OSError:
return False
--
To view, visit https://gerrit.ovirt.org/50525
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I314c8bda6a6831bf334e08085e8bf2fc4874aced
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