This file contains hidden or 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 | |
| for d in /sys/kernel/iommu_groups/*/devices/*; do | |
| n=${d#*/iommu_groups/*}; n=${n%%/*} | |
| printf 'IOMMU Group %s ' "$n" | |
| lspci -nns "${d##*/}" | |
| done |
This file contains hidden or 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 | |
| # | |
| # This script creates a vGPU by echoing values into sysfs. | |
| # Once this script has been run you'll have a passthrough-ready vGPU | |
| # (bound to vfio-pci) inside /sys/bus/pci/devices/ matching | |
| # the parent device address (PF) and virtual device address (VF). | |
| # For example: | |
| # /sys/bus/pci/devices/0000:d0:00.0/virtfn0/ | |
| # or | |
| # /sys/bus/pci/devices/0000:d0:00.1/ |
This file contains hidden or 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 | |
| echo 1 > /sys/class/mdev_bus/*/*-*-*-*-*/remove |