From nobody Fri Jun 5 16:14:13 2026 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gX6322307z6g5ST for ; Fri, 05 Jun 2026 16:14:54 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gX63164VWz40kX for ; Fri, 05 Jun 2026 16:14:53 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-8423efad617so1177801b3a.0 for ; Fri, 05 Jun 2026 09:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780676090; cv=none; d=google.com; s=arc-20240605; b=U4SEpLhYDqYL2ku+8WLmZx83OZB7G8cOY8uCFlN8zFcoFisJU0lvsjvssuwm6bRZWd nDr871yn25tbsFJYPthb5xuy2bIhiKPiehDEX6p4pD09Ud27tsbbTM8SdnyGe/LydMJR J4bYhdE1fkfqUg5sB0aE01oZuB3apISnuD+/upS4uc9MehOsz2kqlu7XyzSW92REPByp GoVMfdKSwhFuLUoO7pxM/JV3EKTkNTgX5V/wXkcYdYhNvsL+G/ZMMuaJIEv+Trf1KpNp j1Ptw8haZzOO7GgIyRkRDDkzubinMAo1WBco5CCqi5Vt6VYZdVjqFPR5EzSvItalJnCe sb4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=4c/4ZkGQn4aMTMLUVIrMHt2DuasR00ND/tFB68e9uNM=; fh=pSEaKB8DiHqBCKZtgg4vzNDhdmZYXI/WKzbuQ4ImB9c=; b=KP9+1TpOjB+02t7yTHJjJC5ZYcbuwnyygjWYIpP2WqeJYVIRFzHO2SNtHsnYAuEDo9 Hs8Sm6fv2t66SvCucgLXTjE7dW42OmMrqhUT2WAeE8zZQ43JMeFcGs9oZvgqQfpu8nTd YK7OivlS8biVWi56vSZx9HyudsQM2LnHYrtD7pvmKWvcR/peVI9upwY5V4bt08TqNWwL FLOJ7BeXClalRQ5i6Qp0vdPP1TEPINT3JNgPI20X99mT/grBejzqFCo5KMcCfTlE1YIs OHQQl66mTjgEfPEP6zqir0LYw/3m5vuFCcLQi3wNdFYjd3lmvmCAu04gHhfcPbPeTaFz 63xQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780676090; x=1781280890; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4c/4ZkGQn4aMTMLUVIrMHt2DuasR00ND/tFB68e9uNM=; b=tAhaCXueadC4uQ34BHRzrmVigrzTKJ3/0pnF9YaJog1dnG1btptWUExUw0QS4Zy1Zn IFynU0arrfIKRaWYK2nQkZ+3t+dpuxmmsK87PdtOp20I3GHW2hpcZdrq5A0ovxmJ7JTW UazVwvPbn09TPBWXFr48R8yYx9oA03Hgu83QeFvSQXuVWH9YiH4Cv5+esel2g1WxIm04 zkYWpfk0+uiXJRNv0S5iaTMqFCink2kBdl32fWkMG6ldvdgXzpNG7ufJFH2eCCx25Vz9 MQjqf6HqojgG/qsC7A/zhod9vozmCtFpgIT+ZMS20tSlUQUVJyc3u+fS+8Gf7jJtcEps m8KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780676090; x=1781280890; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4c/4ZkGQn4aMTMLUVIrMHt2DuasR00ND/tFB68e9uNM=; b=T6wIiyjxQzgaUmxxC8a/w4WYW/1yDPcwCieX6/zgGPpeFn6KQ2ps87nGA9ORZbuW74 Qe5k3VRlQ8YXm4oftFuHaL8bheokaEruUjKXTaq9eMXf/TxS+x2h3dZ1yBlac9NB9UkD twTgPfAeh3+ByKLZHD/8KDXF+xZOXwcdqNoOD9pDOgPrTD7dKkXCIns6E/X8D5f6IHAp j/21EwA+IHp4AAzS6Lv4ryAiecpjqtYIS1/EOIu2GLNZlNKXHib57bxsEKgo745+n1qa QLvyh6tjFETufiBd9gWfoR7ccPDwpJ+elE8ehLreBQ00vUX6m61hjXkjjSObcYDDbr4X WMVw== X-Forwarded-Encrypted: i=1; AFNElJ9ne9IXpUaA0YIPFk0yOblMnnNe/tevcvoKtVKZNxcj6/R6Y3hE6d6I6HI0J2JV4smaRAnwqciSCEmvy4xYNszH2ppwUdlJ@freebsd.org X-Gm-Message-State: AOJu0Yyt+4uUdH59vgvrFa5aeotoRJLPzGCtd2/a41kiEiXBCQW/iC+D j9vgPUJKTOReMmca8or0+n6MKmd4RNNEl6hTBqtaygdNGMRoU+uqFfk9H06Iqto4+JgBN8aRzI4 I+7NqPogpPc/UXNREHk0fM4HageGVha/nIqHm X-Gm-Gg: Acq92OGJ/lTIWYh4A0Is/qLEkqQIcLQv90LsWAEiV81eJGkJ0vJSzomFhN4/Pp1+B9h Hqs8V7Uqi64egVxKgH3H0sSaDvMO31aCNgTNPcCcWp5oCOUVMEW6Iq/d/8MOOXVGokGr2la9e0U yIlamw6VYOpPrkCpKDX6HzFwE4yPrbsMKuG8Q2RShnhDEqFJYR6SHcPTYkKd2yuN/ehlEtArzgU 7Eh4ojYIGEGrNCdRzMBH6ew1fa8ICXNI59vnk2OzTQ0TqxZ6fxnMwr12aq+lI5s60Hfe2H9lTSn paPuqonPUAKmVpoNR/Bjn6mW2orXdFaNU8mKandiWGnb+T0G/IrrcggOPkexvgwOJ9hOFL6mbYR w1hAxAVitJcXScqS6CAqhYPOM/m+hyrbutNBU8vkmkAZjX6wdMc7WJjm0SvrG1/53h75aHrWbWG LOFLtjvWWAG6ZB8XBSaMi+JcoX+fKkctMPTttxZgUuuRksTUTRgLw+MgwzBGQDuT7Epz1HA+6Av bLyYpag5u488QS63ESsxx8RGsXZ+Wwa9ENStxDoOPdoZ794arxmMkCLud1aRcjYc+P6HB509tlK 3mzgj+/7JTH9t2UeNBDfWsZTd6QTqbSQ5IPRbF84k5Pn7HMWsgzNj9chabass4m7Tqt1Jh4TA8A = X-Received: by 2002:a05:6a00:a10:b0:835:3949:3c1f with SMTP id d2e1a72fcca58-842b0f52ec3mr4253205b3a.24.1780676090229; Fri, 05 Jun 2026 09:14:50 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <2225a4a9-3d5d-4f44-977e-d7348db66e0e@app.fastmail.com> In-Reply-To: <2225a4a9-3d5d-4f44-977e-d7348db66e0e@app.fastmail.com> From: Mario Marietto Date: Fri, 5 Jun 2026 18:14:13 +0200 X-Gm-Features: AVHnY4I9nhRxPbZ95LKsIduKuy4unYU5pggB_yJWwfr-VijhGHE5cKOrilw8s6U Message-ID: 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?= To: Chuck Tuffli Cc: =?UTF-8?Q?Corvin_K=C3=B6hne?= , FreeBSD virtualization Content-Type: multipart/alternative; boundary="000000000000d17b2f065383f52c" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4gX63164VWz40kX X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --000000000000d17b2f065383f52c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable -> 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=E2=80=AFPM Chuck Tuffli wrot= e: > 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 m= y > 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 correc= t > 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=E2=80=AFAM Corvin K=C3=B6hne 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=C3=B6hne'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 > --=20 Mario. --000000000000d17b2f065383f52c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
-> From my limited experiments FreeBSD 15 has what= is necessary for Nvidia=20 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 bh= yve'.

Sure. But it didn't work=C2=A0in my = case after having changed the string from "bhyve bhyve" to "= KVMKVMKVM", the Linux VM didn't even start. But after having appli= ed 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=E2=80=AFPM Chuck Tuffli <chuck@tuffli.net> wrote:
On Fri, Jun 5, 2026, at 1= 2:10 AM, Mario Marietto wrote:
--->=C2=A0NVIDIA GPU passthrough should work with sto= ck 15.0, no patches required.

Hello my friend. Unf= ortunately 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 hav= e applied,but it didn't work. So I worked with Claude to fix the bug an= d after some days of work,we developed the correct patches. Now it is worki= ng fine. I attach=C2=A0them here,if you want=C2=A0to give a look.

On Fri, Jun 5, 2026 at 8:34=E2=80=AF= AM Corvin K=C3=B6hne <corvink@freebsd.org> wrote:
=
On Thu, 2026-06-04 at 13:23 +0200, Mario Marietto wrote:
&g= t; =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Hi everyone,
= > =C2=A0I'm trying to get NVIDIA GPU passthrough working with bhyve= on FreeBSD 15.0-
> RELEASE-p5, using Corvin K=C3=B6hne's= nvidia-wip branch:
> =C2=A0The VM fails to start with the fo= llowing error before the guest even boots:
> =C2=A0bhyve: bo= otrom_alloc: vm_mmap_mapseg: Invalid argument

N= VIDIA GPU passthrough should work with stock 15.0, no patches required.
=

From my limited e= xperiments FreeBSD 15 has what is necessary for Nvidia passthru, but, and i= t may be GPU dependent, some Nvidia cards absolutely needed the hypervisor = ID to be 'KVM KVM\0\0' and not 'bhyve bhyve'.
--chuck


--
Mario.
--000000000000d17b2f065383f52c--