ocf / projects

Overview of technical OCF projects
3 stars 0 forks source link

Hydra #31

Closed jdkuki closed 3 years ago

jdkuki commented 5 years ago

Work so far:

https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/#IOMMU_support https://heiko-sieger.info/blacklisting-graphics-driver/#Using_the_driver_override_feature https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs

Pretty much followed the first link, chaning stuff as needed

Added iommu flag to /etc/grub/default Added scripts as mentioned in guide to set driver overrides to vfio-pci for gpu id 42 (highest gpu to left on case) For some reason this doesn't work for the audio controller (bound to snd_hda_intel). Added blacklisted snd_hda_intel. This allowed the driver override to bind the sound device

USB passthrough: Nothing seemed to work for this one. By default its bound to xhci_hcd. Things that don't work: Setting a driver override like the gpu Setting a module alias based on the pci id of the card Blacklisting the module in /etc/modprobe.d/blacklist.conf Adding an entry to /etc/modprobe.d/xhci_hcd.conf containing "blacklist xhci_hcd" Blacklisting with fake install

What eventually worked: Running https://github.com/andre-richter/vfio-pci-bind manually on the pci id

Problems: VM will crash shortly after monitor cable is plugged in.

Steps to reproduce: Start ./testvm.sh in /home/j/jk/jkuki with passed-through gpu plugged in You will see grub. After grub disappears the screen will scramble. If you press the keyboard during this time, you'll see the selection move but will freeze before screen scrambles.

Why I think its the monitor being plugged in that seems to crash it: Ubuntu will actually boot all the way without the monitor plugged in.

Unplug montior from passed through gpu start ./testvm.sh wait 30secs-min plug in monitor Ubuntu splash screen will be present, however, vm will be frozen

emmatyping commented 5 years ago

Thank you so much for working on this!

Have you looked at the "Pass-through host USB device" section in https://wiki.archlinux.org/index.php/QEMU ? That may be worth a try. Nevermind, we probably want to pass through the controllers. Did you mention that the controllers don't show up separately?

Added blacklisted snd_hda_intel. This allowed the driver override to bind the sound device

So then the VM can load sounds correctly? Or it just binds to the device but doesn't give audio? Also AFAIK audio from VMs is a PITA, so we may need to just buy USB audio adapters... Though if we don't want to go that route, we may need to try these changes https://passthroughpo.st/how-to-patch-qemu-and-fix-vm-audio/ ?

VM will crash shortly after monitor cable is plugged in.

Did you have any time to look into this? Perhaps there is logs that might help point to why.

Vio-Eli commented 5 years ago

We need to get a new USB PCIE board. current one can't do what we need. it's in the buysheet. https://www.amazon.com/gp/product/B015CQ8DCS?th=1

Meanwhile, Imma see what we can do by routing it by usb device not by the hub

emmatyping commented 3 years ago

RIP