Hacker News new | past | comments | ask | show | jobs | submit login

Would you mind sharing your VM setup with PCI passthrough? I had looked into this previouly, but guides I saw seemed to only let you pass it through depending on settings at boot of the host OS. From what I understand, this means that if I wanted to pass the GPU through to the VM, I would lose it in the host OS until I reboot again. Does your setup let you hotswap it w/o a reboot?

Yes, my current setup does allow hotswapping the GPU from the host and guest. It does require using the integrated or some other GPU to run your X11 server and then using primusrun when you want to use the dedicated GPU on the host. I'm using a rather old GTX 760 so I'm not sure if there are any limitations with newer nvidia cards.

My kernel line is (I disable the spectr/meltdown mitigations so ignore those parts):

  root=/dev/mapper/ssd-arch--root rw intel_iommu=on iommu=pt i915.enable_guc=3 i915.disable_power_well=0 i915.enable_psr=1 i915.enable_fbc=1 i915.enable_rc6=1 pci=nomsi,noaer pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier
The XML for the VM I configured in virt-manager can be found here:


I don't think has any significant modifications. Eventually I want to switch over to using the newer q35 architecture. The only issues I've had with the VM are some audio glitches in some games and it has recently had issues with hugepages so I've had to disable that.

This is awesome, thank you so much!

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact