1
1
Fork 0
nixos/options/custom/scripts/iommu.sh
Myned de8f54ead2
iommu.sh: initial script
Signed-off-by: Myned <dev@bjork.tech>
2024-12-06 19:43:29 -06:00

12 lines
337 B
Bash

#! /usr/bin/env bash
# https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Ensuring_that_the_groups_are_valid
shopt -s nullglob
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
echo "IOMMU Group ${g##*/}:"
for d in "$g"/devices/*; do
echo -e "\t$(lspci -nns "${d##*/}")"
done
done