Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2026 18:14:13 +0200
From:      Mario Marietto <marietto2008@gmail.com>
To:        Chuck Tuffli <chuck@tuffli.net>
Cc:        =?UTF-8?Q?Corvin_K=C3=B6hne?= <corvink@freebsd.org>,  FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   =?UTF-8?Q?Re=3A_=2A=2A=5BHelp=5D_bhyve=3A_bootrom=5Falloc=3A_vm=5Fmmap=5Fmapseg=3A_I?= =?UTF-8?Q?nvalid_argument_=E2=80=94_NVIDIA_passthrough_with_Corvin=27s_branch_?= =?UTF-8?Q?on_FreeBSD_15=2E0=2A=2A?=
Message-ID:  <CA%2B1FSihmc720RM_ucUzSf16GDoUX=-WU2CcQHMebeRR34znsxA@mail.gmail.com>
In-Reply-To: <2225a4a9-3d5d-4f44-977e-d7348db66e0e@app.fastmail.com>
References:  <CA%2B1FSiiGdW4JCi=XA68Wtr1pDbMNAwTpwq9P8TixdDGRHSf%2B6g@mail.gmail.com> <bc674b3f2815204306480f88f71b48ff886c8a56.camel@FreeBSD.org> <CA%2B1FSihAcrz-9vV8rZjF%2BzoLRSACV3FPdYMcPe-61uW-KSf1kg@mail.gmail.com> <2225a4a9-3d5d-4f44-977e-d7348db66e0e@app.fastmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
-> From my limited experiments FreeBSD 15 has what is necessary for Nvidia
passthrough, 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'.

Sure. But it didn't work in my case after having changed the string from
"bhyve bhyve" to "KVMKVMKVM", the Linux VM didn't even start. But after
having applied the Claude patches it started working. The problem fixed by
the patches affects only FreeBSD 15.x,not 14.


On Fri, Jun 5, 2026 at 5:55 PM Chuck Tuffli <chuck@tuffli.net> wrote:

> 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
>


-- 
Mario.

[-- Attachment #2 --]
<div dir="ltr"><div>-&gt; From my limited experiments FreeBSD 15 has what is necessary for Nvidia 
passthrough, but, and it may be GPU dependent, some Nvidia cards absolutely
 needed the hypervisor ID to be &#39;KVM KVM\0\0&#39; and not &#39;bhyve bhyve&#39;.</div><div><br></div><div>Sure. But it didn&#39;t work in my case after having changed the string from &quot;bhyve bhyve&quot; to &quot;KVMKVMKVM&quot;, the Linux VM didn&#39;t even start. But after having applied the Claude patches it started working. The problem fixed by the patches affects only FreeBSD 15.x,not 14.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 5, 2026 at 5:55 PM Chuck Tuffli &lt;<a href="mailto:chuck@tuffli.net" target="_blank">chuck@tuffli.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div><div>On Fri, Jun 5, 2026, at 12:10 AM, Mario Marietto wrote:</div><blockquote type="cite" id="m_4201055120104175121m_334330923560973252m_5928303523040873280qt"><div dir="ltr"><div><span>---&gt; </span>NVIDIA GPU passthrough should work with stock 15.0, no patches required.</div><div><br></div><div>Hello my friend. Unfortunately it does not. Not even with 15.0-p9. With my system it didn&#39;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&#39;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.</div></div><div><br></div><div><div dir="ltr">On Fri, Jun 5, 2026 at 8:34 AM Corvin Köhne &lt;<a href="mailto:corvink@freebsd.org" target="_blank">corvink@freebsd.org</a>&gt; wrote:</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On Thu, 2026-06-04 at 13:23 +0200, Mario Marietto wrote:</div><div> &gt;         Hi everyone, </div><div> &gt;  I&#39;m trying to get NVIDIA GPU passthrough working with bhyve on FreeBSD 15.0-</div><div> &gt; RELEASE-p5, using Corvin Köhne&#39;s nvidia-wip branch: </div><div> &gt;  <a href="https://github.com/Beckhoff/freebsd-src/tree/phab/corvink/15.0/nvidia-wip" rel="noreferrer" target="_blank">https://github.com/Beckhoff/freebsd-src/tree/phab/corvink/15.0/nvidia-wip</a>; </div><div> &gt;  The VM fails to start with the following error before the guest even boots: </div><div> &gt;  bhyve: bootrom_alloc: vm_mmap_mapseg: Invalid argument </div><div> <br></div><div> NVIDIA GPU passthrough should work with stock 15.0, no patches required.<br></div></blockquote></div></blockquote><div><br></div><div>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 &#39;KVM KVM\0\0&#39; and not &#39;bhyve bhyve&#39;.</div><div><br></div><div>--chuck</div></div></blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSihmc720RM_ucUzSf16GDoUX=-WU2CcQHMebeRR34znsxA>