aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-30 15:24:59 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-30 15:24:59 +0000
commit1d4f12f8d205110c1a9cf00728792c4c40f300d9 (patch)
tree8cdeb39610a5dbb4f8a4b42f2d72775c7357f848
parentdc02cbd4a982c2f80d3426f78dd13047b9e3c767 (diff)
script from the docs on gpu passthru to detect iommuHEADmaster
-rwxr-xr-xiommu_detect.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/iommu_detect.sh b/iommu_detect.sh
new file mode 100755
index 0000000..29b3068
--- /dev/null
+++ b/iommu_detect.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+#
+shopt -s nullglob
+
+for g in /sys/kernel/iommu_groups/*; do
+ echo "IOMMU Group ${g##*/}:"
+ for d in $g/devices/*; do
+ echo -e "\t$(lspci -nns ${d##*/})"
+ done;
+done;
+