Re:_**[Help]_bhyve:_bootrom_alloc:_vm_mmap_mapseg:_Inval id_argument_—_NVIDIA_passthrough_with_Corvin's_branch _on_FreeBSD_15.0**

From: Chuck Tuffli <chuck_at_tuffli.net>
Date: Fri, 05 Jun 2026 15:54:14 UTC
On Fri, Jun 5, 2026, at 12:10 AM, Mario Marietto wrote:
> ---> NVIDIA GPU passthrough should work with stock 15.0, no patches required.
> 
> Hello my friend. Unfortunately it does not. Not even with 15.0-p9. With my system it didn't work. If you go on the FreeBSD forums you see people saying that they are still using the passthru on FreeBSD 14. One user offered a patch that I have applied,but it didn't work. So I worked with Claude to fix the bug and after some days of work,we developed the correct patches. Now it is working fine. I attach them here,if you want to give a look.
> 
> On Fri, Jun 5, 2026 at 8:34 AM Corvin Köhne <corvink@freebsd.org> wrote:
>> On Thu, 2026-06-04 at 13:23 +0200, Mario Marietto wrote:
>> >         Hi everyone, 
>> >  I'm trying to get NVIDIA GPU passthrough working with bhyve on FreeBSD 15.0-
>> > RELEASE-p5, using Corvin Köhne's nvidia-wip branch: 
>> >  https://github.com/Beckhoff/freebsd-src/tree/phab/corvink/15.0/nvidia-wip 
>> >  The VM fails to start with the following error before the guest even boots: 
>> >  bhyve: bootrom_alloc: vm_mmap_mapseg: Invalid argument 
>> 
>> NVIDIA GPU passthrough should work with stock 15.0, no patches required.

From my limited experiments FreeBSD 15 has what is necessary for Nvidia passthru, but, and it may be GPU dependent, some Nvidia cards absolutely needed the hypervisor ID to be 'KVM KVM\0\0' and not 'bhyve bhyve'.

--chuck