Added some scripts for VFIO

This commit is contained in:
Warren Hood 2023-12-08 04:45:50 +02:00
parent 3e567de177
commit 10cb42ccc4
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,8 @@
#!/bin/env bash
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;

10
scripts/.scripts/vm_activate Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
echo "Unloading nvidia_drm"
sudo modprobe -r nvidia_drm
echo "Setting graphics mode to Vfio"
supergfxctl -m Vfio
echo "Restarting libvirtd"
sudo systemctl restart --now libvirtd

10
scripts/.scripts/vm_deactivate Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
echo "Loading nvidia_drm"
sudo modprobe nvidia_drm
echo "Setting graphics mode to Integrated"
supergfxctl -m Integrated
echo "Restarting libvirtd"
sudo systemctl restart --now libvirtd