update information to the user
This commit is contained in:
parent
b84b24c5d5
commit
fce0063f44
2 changed files with 13 additions and 0 deletions
|
@ -43,6 +43,8 @@ vfio_virqfd
|
||||||
printf "# This is an autogenerated file that stubs your graphic card for use with vfio
|
printf "# This is an autogenerated file that stubs your graphic card for use with vfio
|
||||||
# This file should be placed inside /etc/modprobe.d/
|
# This file should be placed inside /etc/modprobe.d/
|
||||||
options vfio_pci ids=$GPU_DEVID
|
options vfio_pci ids=$GPU_DEVID
|
||||||
|
|
||||||
|
# Make sure vfio_pci is loaded before these modules: nvidia, nouveau, amdgpu and radeon
|
||||||
softdep nvidia pre: vfio vfio_pci
|
softdep nvidia pre: vfio vfio_pci
|
||||||
softdep nouveau pre: vfio vfio_pci
|
softdep nouveau pre: vfio vfio_pci
|
||||||
softdep amdgpu pre: vfio vfio_pci
|
softdep amdgpu pre: vfio vfio_pci
|
||||||
|
|
11
vfio-verify
11
vfio-verify
|
@ -4,14 +4,25 @@
|
||||||
SCRIPTDIR=$(dirname `which $0`)
|
SCRIPTDIR=$(dirname `which $0`)
|
||||||
cd $SCRIPTDIR
|
cd $SCRIPTDIR
|
||||||
|
|
||||||
|
# If there is a config generated, then $SCRIPTDIR/config/kernel_args
|
||||||
|
# should exist, which contains all the info we need
|
||||||
if [ -f $SCRIPTDIR/config/kernel_args ];
|
if [ -f $SCRIPTDIR/config/kernel_args ];
|
||||||
then
|
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/")
|
DEVID=$(cat $SCRIPTDIR/config/kernel_args | cut -d " " -f 3 | cut -d "=" -f 2 | perl -pe "s/^([0-9a-f]{4}:).*/\1/")
|
||||||
echo "#------------------------------------------#"
|
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"
|
lspci -d $DEVID -v | grep -iP "kernel driver|amd|radeon|nvidia|nouveau" | grep -vi "kernel modules"
|
||||||
echo "#------------------------------------------#"
|
echo "#------------------------------------------#"
|
||||||
|
|
||||||
printf "
|
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 these devices are \"vfio-pci\", then VFIO has been successfully enabled!
|
||||||
|
If the system freezes when you start a VM with the passthrough then you might need to force disable video output
|
||||||
|
for the card on boot (or if you do not have another GPU from the same vendor (AMD/NVIDIA), you can blacklist the driver).
|
||||||
"
|
"
|
||||||
|
|
||||||
|
else
|
||||||
|
# Tell user to run the setup first if the kernel_args file is not found
|
||||||
|
echo "Please run \"$SCRIPTDIR/vfio-setup\" first!"
|
||||||
|
|
||||||
fi
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue