Change in vdsm[ovirt-3.6.3]: hostdev: fix detection for ppc64le
mpolednik at redhat.com
mpolednik at redhat.com
Wed Feb 10 10:28:41 UTC 2016
Hello Francesco Romani,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/53337
to review the following change.
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
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1306196
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/50525
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/caps.py
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/53337/1
diff --git a/vdsm/caps.py b/vdsm/caps.py
index fea309f..ae038a7 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -612,8 +612,12 @@
def _getHostdevPassthorughSupport():
try:
- return (bool(len(os.listdir('/sys/class/iommu'))) and
- bool(len(os.listdir('/sys/kernel/iommu_groups'))))
+ iommu_groups_exist = bool(len(os.listdir('/sys/kernel/iommu_groups')))
+ if platform.machine() in Architecture.POWER:
+ return iommu_groups_exist
+
+ dmar_exists = bool(len(os.listdir('/sys/class/iommu')))
+ return iommu_groups_exist and dmar_exists
except OSError:
return False
--
To view, visit https://gerrit.ovirt.org/53337
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I314c8bda6a6831bf334e08085e8bf2fc4874aced
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6.3
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list