Re: bhyve: GPU passthrough for Nvidia cards
- In reply to: Corvin Köhne : "Re: bhyve: GPU passthrough for Nvidia cards"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Jun 2025 07:17:27 UTC
On 6/27/25 08:38, Corvin Köhne wrote: > On Thu, 2025-06-26 at 16:49 +0200, Stephan Althaus wrote: >> On 6/26/25 15:07, Corvin Köhne wrote: >>> Hi, >>> >>> I'm currently experimenting with GPU passthrough for Nvidia cards. All I >>> have to >>> do to make it work with Ubuntu guests, is setting the INTPIN register to any >>> value instead of just 0x00. Unfortunately, I'm unfamiliar with PCI legacy >>> interrupts and how they work. The INTLINE register is set to 0xFF >>> (unconnected). >>> So, is it safe to set the INTPIN register or what has to be done for it to >>> work >>> as expected? >>> >>> Any help would be appreciated. >>> >>> >> Hi! >> >> You surely mean 'newer' NVidia cards, as my GT1030 works with FreeBSD >> 14.2 Host and ubuntu guest, NVIdia driver 570, (and Win guest btw) >> out-of-the-box, no kernel/driver modding... >> >> Regards, >> >> Stephan >> >> > FYI, I'm working on a desktop system with an RTX A500 on 15.0-CURRENT. > > Ubuntu dmesg reports "NVRM: Can't find an IRQ for your NVIDIA card!" by default. > Setting the INTPIN register solve this issue and the card can be detected by the > nvidia-smi command. However, as mentioned in my initial post, I'm not sure what > has to be emulated to be able to set the INTPIN in a sane way. > > Hi! I am sorry, i have no knowledge on that topic, how that works in detail. What i can say from my recent tests on various hosts/guests, with my GT1030, that the GPU mostly has INT_PIN 0x01, and the audio device always INT_PIN 0x02. I can't say for sure if it is 'always' because i don't think i have log files for each combination :-/ 00:08.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1) (prog-if 00 [VGA controller])   Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8c98   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-   Latency: 0, Cache Line Size: 64 bytes   Interrupt: pin A routed to IRQ 45 00:08.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)   Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8c98   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx+   Latency: 0, Cache Line Size: 64 bytes   Interrupt: pin B routed to IRQ 22 With the AMD RX 6400 there is the same pattern: PIN A to the GPU, PIN B to the audio device.. I am not shure where the INT_PIN gets set/mapped, in the bhyve command or by the BHYVE_UEFI BIOS, or by the guest OS (?) If you need some special info, i will happily assist and startup my BSD host and see... Regards, Stephan