detect if IOMMU is properly enabled
This commit is contained in:
parent
fce0063f44
commit
3a8d00e194
1 changed files with 18 additions and 4 deletions
22
vfio-setup
22
vfio-setup
|
@ -111,22 +111,36 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run ls-iommu so we can verify that IOMMU properly working
|
# Run ls-iommu so we can verify that IOMMU properly working
|
||||||
"$SCRIPTDIR/utils/ls-iommu"
|
LS_IOMMU=$($SCRIPTDIR/utils/ls-iommu)
|
||||||
|
|
||||||
printf "
|
if [[ $LS_IOMMU =~ ^IOMMU[[:space:]]Group[[:space:]]+\*: ]];
|
||||||
If the above list has everything inside just 1 IOMMU group the please enable
|
then
|
||||||
IOMMU, VT-d or AMD-v inside your UEFI/BIOS and add \"$CMDLINE\"
|
printf "IOMMU IS NOT ENABLED!
|
||||||
|
Please enable IOMMU, VT-d or AMD-v inside your UEFI/BIOS and add \"$CMDLINE\"
|
||||||
to your kernel boot arguments and reboot your system, then re-run this script!
|
to your kernel boot arguments and reboot your system, then re-run this script!
|
||||||
"
|
"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$LS_IOMMU"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
read -p "Is there more than 1 group in the output above? [y/N]: " YESNO
|
read -p "Is there more than 1 group in the output above? [y/N]: " YESNO
|
||||||
case "${YESNO}" in
|
case "${YESNO}" in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
clear
|
clear
|
||||||
;;
|
;;
|
||||||
[Nn]*)
|
[Nn]*)
|
||||||
|
printf "Please enable IOMMU, VT-d or AMD-v inside your UEFI/BIOS and add \"$CMDLINE\"
|
||||||
|
to your kernel boot arguments and reboot your system, then re-run this script!
|
||||||
|
"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
printf "Please enable IOMMU, VT-d or AMD-v inside your UEFI/BIOS and add \"$CMDLINE\"
|
||||||
|
to your kernel boot arguments and reboot your system, then re-run this script!
|
||||||
|
"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue