From 692ca7f83aec7a96c4586f4b0a68d67153d98274 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:26:19 +0100 Subject: [PATCH] more updates to work with the new ls-iommu --- lib/set_VFIO.sh | 1 - vfio-verify | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/set_VFIO.sh b/lib/set_VFIO.sh index 2aff7e2..7960f21 100755 --- a/lib/set_VFIO.sh +++ b/lib/set_VFIO.sh @@ -7,7 +7,6 @@ function set_VFIO () { # Assign the GPU device ids to a variable GPU_DEVID="$1" - echo $GPU_DEVID # Get the kernel_args file content CMDLINE=$(cat "$SCRIPTDIR/config/kernel_args") diff --git a/vfio-verify b/vfio-verify index 2130a93..00511bc 100755 --- a/vfio-verify +++ b/vfio-verify @@ -9,15 +9,13 @@ cd "$SCRIPTDIR" # should exist, which contains all the info we need if [ -f "$SCRIPTDIR/config/kernel_args" ]; then - # Fetch part of the device id we need - DEVID=$(cat "$SCRIPTDIR/config/kernel_args" | cut -d " " -f 3 | cut -d "=" -f 2 | perl -pe "s/^([0-9a-f]{4}:).*/\1/") echo "#------------------------------------------#" # List info about the vfio gpu and what kernel driver is being used - lspci -d "$DEVID" -v | grep -iP "kernel driver|amd|radeon|nvidia|nouveau" | grep -vi "kernel modules" + "$SCRIPTDIR/utils/ls-iommu" -g -r -k echo "#------------------------------------------#" printf " -If the \"Kernel driver in use\" for these devices are \"vfio-pci\", then VFIO has been successfully enabled! +If the \"Kernel driver in use\" for the passed through devices are \"vfio-pci\", then VFIO has been successfully enabled! NOTE: If your system freezes when starting a VM that uses your VFIO enabled card.. consider adding the below line to your bootloaders kernel arguments: