nvidia-smi fail on KVM guest with Quadro M1200 Mobile in PCI passthrough

I am trying to use the nvidia Quadro M1200 Mobile card on a VM on my Zbook 17 G5 laptop for testing cuda.
I can successfully attach my PCI card to the VM (RHEL7).

The VM boot correctly and report the PCI Card correctly.
The drivers is also installed and seems to work.

But when trying to used nvidia-smi it fails.


Unable to determine the device handle for GPU 0000:04:00.0: Unknown Error

Logs show this:

[ 2.925239] [drm] [nvidia-drm] [GPU ID 0x00000400] Loading driver
[ 2.925242] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:04:00.0 on minor 1
[ 90.828961] nvidia 0000:04:00.0: irq 41 for MSI/MSI-X
[ 90.836317] NVRM: RmInitAdapter failed! (0x23:0x56:483)
[ 90.836343] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 90.939416] nvidia 0000:04:00.0: irq 41 for MSI/MSI-X
[ 90.945274] NVRM: RmInitAdapter failed! (0x23:0x56:483)
[ 90.945343] NVRM: rm_init_adapter failed for device bearing minor number 0

In several Howto article on Internet, it is indicated it may relate to vbios. I have unfortunately not been able to export vbios from the card. Therefor I currently do not load ROM.

The VM is also using UEFI. May be using legacy bios would be better?

How could I solve this? Any recommendation?

nvidia-bug-report.log.gz (1010 KB)

The hypervisor has to be hidden.
Nevertheless, this rarely works with Optimus notebooks, also due to the missing vbios.
You could try this to get to it:

I got the vbios from the windows registry and it is OK according to rom-checker.
But apparently it is not enough. It seems it is needed to patch it?
It is not UEFI compatible either.

Could NVIDIA not provide something working?

  • driver supporting KVM?
  • vbios working in pci passthrough with KVM?

For the hypervisor, as I do not get the error 43, I assume it is not the current issue… I should try again…?