Linux KVM Guest with GPU Passthrough doesn't work (Black Screen)
Solution 1:
You can only have a specific PCI/PCIe device passed through to one VM at a time. You cannot suspend/save (as in virsh save
) VMs with physical PCI device passed through to them. You will have to shut down one VM before you start up another to juggle the PCI device between them.
If the VM is causing you performance issues on the host:
1) Don't pass the guest VM all of your physical CPU cores. For example, if you have 4 cores / 8 threads on the host, don't give more than 3 cores / 6 threads to the VM.
2) Pin virtual CPU threads to physical CPU threads.
3) Expose the CPU topology (sockets/cores/threads) to the VM so that the kernel in the guest can at least try to sanely schedule processes between CPU cores/threads it was given.
4) Use huge pages for the VM