From a923104f23b61c315cc355f25f4bef4528c45f49 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 16 Nov 2018 16:17:49 +0100 Subject: [PATCH] SysFSTools: implement IOMMU check Signed-off-by: Dominik Csapak --- src/PVE/SysFSTools.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm index 660f94b..e4bc328 100644 --- a/src/PVE/SysFSTools.pm +++ b/src/PVE/SysFSTools.pm @@ -33,12 +33,8 @@ sub lspci { } sub check_iommu_support{ - #fixme : need to check IOMMU support - #http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM - - my $iommu=1; - return $iommu; - + # iommu support if there is anything in /sys/class/iommu besides . or .. + return PVE::Tools::dir_glob_regex('/sys/class/iommu/', "[^\.].*"); } sub file_write { -- 2.39.2