News for hackers. Stuff that matters.
Re:AMD Ryzen Full Lineup Prices, Specs and Clock Speeds Leaked by jbmorgado on Sunday February 12, 2017 @08:44PM (#13632518)
Because it's (well, at least 6 months ago was, now it could have improved) the only solution to reuse the GPU without rebooting X.

With a practical example:

1 - You boot up your Linux base system.

2 - You fire up KVM with GPU PCI passthrough with a Windows guest to play some games.

3 - You shutdown windows.

Now you can't use the GPU anymore, the module was assigned by KVM and you can't - for instance - run a CUDA simulation in the Linux host. You need to reboot X (you don't need to reboot the system).

The workaround/solution is to fire up KVM with GPU PCI passthrough to another guest (This time a Linux guest) and in there you will have full access to the GPU to do CUDA computations (or whatever else you want).

Re:AMD Ryzen Full Lineup Prices, Specs and Clock Speeds Leaked by pYQAJ6Zm on Monday February 13, 2017 @06:59AM (#13634645)
>Now you can't use the GPU anymore, the module was assigned by KVM and you can't - for instance - run a CUDA simulation in the Linux host.

Maybe we had different setups, so this wouldn’t apply – I used to unbind the device with the following script, and then load the `nvidia` module; the device was then available on the host:

  for dev in "0000:01:00.0" "0000:01:00.1"; do
          if [ -e /sys/bus/pci/devices/${dev}/driver ]; then
                  echo "${dev}" > /sys/bus/pci/devices/${dev}/driver/unbind
          fi
  done
Re:AMD Ryzen Full Lineup Prices, Specs and Clock Speeds Leaked by pavanky on Monday February 13, 2017 @01:03AM (#13633432)
Ah I see, that makes more sense. If you had two NVIDIA GPUs while one of them was passed through to a guest then I think that problem may still exist.

However if you only have one nvidia gpu (and have a different kind of gpu for display), then I think simply running "sudo rmmod vfio" "sudo modprobe nvidia" would work.