mirror of
https://gitlab.com/YuriAlek/vfio.git
synced 2024-11-17 09:25:36 +00:00
11 lines
431 B
Bash
Executable File
11 lines
431 B
Bash
Executable File
#!/bin/bash
|
|
## Outputs the IOMMU groups and the devices inside them
|
|
## Source [https://wiki.installgentoo.com/index.php/PCI_passthrough#Step_2:_Find_out_your_IOMMU_groups]
|
|
for iommu_group in \
|
|
$(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do \
|
|
echo "IOMMU group $(basename "$iommu_group")"; \
|
|
for device in $(ls -1 "$iommu_group"/devices/); do \
|
|
echo -n $'\t'; lspci -nns "$device"; \
|
|
done; \
|
|
done
|