GNU bug report logs - #55907
VFIO kernel module fails to capture PCI device

Previous Next

Package: guix;

Reported by: "Nick Zalutskiy" <nick <at> const.fun>

Date: Sat, 11 Jun 2022 13:41:02 UTC

Severity: normal

Full log


Message #11 received at 55907 <at> debbugs.gnu.org (full text, mbox):

From: Nikola Brković <nikolabrk <at> protonmail.com>
To: "55907 <at> debbugs.gnu.org" <55907 <at> debbugs.gnu.org>
Subject: VFIO kernel module fails to capture PCI device
Date: Thu, 04 Jul 2024 21:37:24 +0000
I have managed to get VFIO working by creating a service of boot-service-type which overrides the GPU driver with vfio-pci and binds the GPU to VFIO:

>(simple-service 'vfio-override boot-service-type
>    '(and (call-with-output-file "/sys/bus/pci/devices/0000:04:00.0/driver_override"
>      (lambda (p)
>       (display "vfio-pci" p)))
>     (call-with-output-file "/sys/bus/pci/drivers/vfio-pci/new_id"
>      (lambda (p)
>       (display "1002 665f" p)))
>  )
>)

Sorry for the hard-coded IDs, you should replace them with your own. You might need to unbind the GPU's audio card from its driver as well, after you're fully booted. QEMU will refuse to pass-through the GPU if the audio card is in the same IOMMU group and not using vfio-pci.

In my case, the service runs early enough in the boot process where amdgpu has not initialized the GPU yet. There might be a better way to accomplish this, I'm still new to Guix and Scheme.

Thanks,
Nikola




This bug report was last modified 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.