Created
July 9, 2021 10:57
-
-
Save turbulentie/a6732876e2917754bce6c7b242d8bcba to your computer and use it in GitHub Desktop.
show group of devices for KVM passthrough
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ----------------------------------------------------------------------------- | |
# iommu-group: show group of devices for KVM passthrough | |
# ----------------------------------------------------------------------------- | |
iommu-group() { | |
for d in /sys/kernel/iommu_groups/*/devices/*; do | |
n=${d#*/iommu_groups/*}; | |
n=${n%%/*}; | |
printf 'IOMMU Group %s ' "$n"; | |
lspci -nns "${d##*/}"; | |
done; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment