Roboto3x

VFIO Binding / QEMU misc notes

Apr 5th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.93 KB | None | 0 0
  1. https://download.qemu.org/qemu-5.0.0-rc1.tar.xz
  2. ./configure --enable-libusb  (Otherwise No USB passthrough)  ** other flags are available **
  3. sudo make && sudo make install
  4.  
  5. Preliminary Steps for Binding and Unbinding - if you want to boot without vfio driver
  6. Also enables full passthrough. GPU tested Nvidia RTX 2080, Nvidia 1050ti
  7.  
  8. Script 1 of 2
  9.  
  10. #!/bin/sh
  11. PREREQS=""
  12. DEVS="0000:09:00.0 0000:09:00.1 0000:41:00.0 0000:41:00.1 0000:41:00.2 0000:41:00.3"
  13. for DEV in $DEVS;
  14.   do echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
  15. done
  16. modprobe -i vfio-pc
  17.  
  18.  
  19. Script 2 of 2
  20.  
  21. #Unbind from current driver (add ones that have not binded to the vfio driver)
  22.  
  23. echo "10de 0fb9" > /sys/bus/pci/drivers/vfio-pci/new_id
  24. #unbind USB:
  25. echo "0000:09:00.1" > /sys/bus/pci/devices/0000:09:00.1/driver/unbind
  26.  
  27. #Bind to vfio-pci
  28.  
  29. echo "0000:09:00.1" > /sys/bus/pci/drivers/vfio-pci/bind
  30.  
  31. #Rescan PCI
  32. echo 1 > /sys/bus/pci/rescan
Advertisement
Add Comment
Please, Sign In to add comment