Virtualization on FW16's Ryzen 9 (7940HS)

One potential issue you may hit (that I didn’t see mentioned here yet) if you want to pass through the AMD graphics is that AMD’s consumer GPUs don’t support SR-IOV. This means the dGPU can only be passed through to a single VM.

Intel iGPUs (and I think Nvidia GPUs ones with a tweaked driver) support SR-IOV, which lets you use the GPU for things like hardware acclerated video encode/decode across multiple VMs (or both the VM and the host system) at the same time. I use it on my home server running Unraid, to transcode video (TV shows recorded with a HDHomeRun) in a Docker container while also using hardware accelerated transcoding in a Windows Server 2022 VM for Blue Iris (security camera software).

Ah so there is progress, looks like you’re almost there :slight_smile:
Error 43 indicates driver errors, this could be because the driver doesn’t want to play nice in a VM (NVidia is notorious for that, but hey, this is AMD, and should work better). It could also indicate that the driver is expecting a different pci bus configuration (which is more likely i think).

There’s a few more things you could try. Looking at the command-line you posted earlier, i suggest the following:

  • in the ‘-device vfio-pci,host=0000:03:00.0’ line add ‘multifunction=on’, and remove the ‘romfile=…’ option.
  • also in the ‘-device vfio-pci’ lines, you now have different bus= assignment, each with address 0x0. Instead, try having them on the same bus, but then with address 0x0.0 and address 0x0.1 respectively, that way the video and audio devices are configured as subfunctions of the same master device, just like on the host.
  • in the ‘-cpu’ line, try adding the ‘kvm=off’ flag.

Not sure how to do that in libvirt, but surely it has an option for using ‘multifunction’ devices, which is the essence here.

Good luck!