1#!/usr/bin/env bash
2 3# https://drakeor.com/2022/02/16/kvm-gpu-passthrough-tutorial/
4 5shopt -s nullglob
6for g in /sys/kernel/iommu_groups/*; do
7 echo "IOMMU Group ${g##*/}:"
8 for d in $g/devices/*; do
9 echo -e "\t$(lspci -nns ${d##*/})"
10 done;
11done