More updates to work with the go version of ls-iommu

This commit is contained in:
HikariKnight 2023-03-16 21:13:52 +01:00
parent 596ec53026
commit 674cffb516
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
4 changed files with 6 additions and 6 deletions

View file

@ -8,7 +8,7 @@ does not belong to itself. Both cards must also have unique hardware ids [xxxx:y
"
echo "#------------------------------------------#"
exec "$SCRIPTDIR/utils/ls-iommu" -g | cut -d " " -f 1-5,10-
"$SCRIPTDIR/utils/ls-iommu" -g -F name,device_id,optional_revision
echo "#------------------------------------------#"
printf "

View file

@ -18,11 +18,11 @@ Optionally it may also include:
"
echo "#------------------------------------------#"
exec "$SCRIPTDIR/utils/ls-iommu" -i "$1" -r | cut -d " " -f 1-5,6- | perl -pe "s/\[[0-9a-f]{4}\]: //"
"$SCRIPTDIR/utils/ls-iommu" -i "$1" -r -F subclass_name:,name,device_id,optional_revision # | cut -d " " -f 1-5,6- | perl -pe "s/\[[0-9a-f]{4}\]: //"
echo "#------------------------------------------#"
printf "
To use any of these devices for passthrough ALL of them has to be passed through to the VMs\
To use any of these devices for passthrough ALL of them (except PCI bridges in their own IOMMU groups) has to be passed through to the VMs\
To return to the previous page just press ENTER without typing in anything.
"

View file

@ -9,7 +9,7 @@ is only needed if you intend to use other devices than just mouse and keyboard w
"
echo "#------------------------------------------#"
exec "$SCRIPTDIR/utils/ls-iommu" | grep -i "usb controller" | cut -d " " -f 1-5,9-
"$SCRIPTDIR/utils/ls-iommu" -u -F name,device_id,optional_revision
echo "#------------------------------------------#"
printf "
Press q to quit

View file

@ -13,7 +13,7 @@ if you do not know what you are doing.
"
echo "#------------------------------------------#"
exec "$SCRIPTDIR/utils/ls-iommu" -i "$1" | cut -d " " -f 1-5,6- | perl -pe "s/ \[[0-9a-f]{4}\]: /: /"
"$SCRIPTDIR/utils/ls-iommu" -i "$1" -F subclass_name:,name,device_id,optional_revision
echo "#------------------------------------------#"
printf "
@ -27,7 +27,7 @@ To return to the previous page just press ENTER.
[Yy]*)
# Get the PCI ids
local PCI_ID
PCI_ID=$("$SCRIPTDIR/utils/ls-iommu" -i "$1" | cut -d " " -f 5 | perl -pe "s/([0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
PCI_ID=$("$SCRIPTDIR/utils/ls-iommu" -i "$1" --pciaddr | perl -pe "s/([0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
# Replace the blank USB_CTL_ID with the PCI_ID for the usb controller the user wants to pass through
perl -pi -e "s/USB_CTL_ID=\(\)/USB_CTL_ID=\($PCI_ID\)/" "$SCRIPTDIR/$QUICKEMU/qemu-vfio_vars.conf"