From nobody Tue Jun 16 15:47:01 2026 X-Original-To: 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 4gfrw75Pd8z6hN2j for ; Tue, 16 Jun 2026 15:47:19 +0000 (UTC) (envelope-from mgrooms@shrew.net) Received: from mx1.shrew.net (mx1.shrew.net [204.27.62.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4gfrw66Qg5z48MQ for ; Tue, 16 Jun 2026 15:47:18 +0000 (UTC) (envelope-from mgrooms@shrew.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=shrew.net header.s=default header.b="bhfdB/RZ"; dmarc=none; spf=pass (mx1.freebsd.org: domain of mgrooms@shrew.net designates 204.27.62.57 as permitted sender) smtp.mailfrom=mgrooms@shrew.net Received: from mail.shrew.net (mail1.shrew.prv [10.26.2.18]) by mx1.shrew.net (8.18.1/8.18.1) with ESMTP id 65GFl7t2080415 for ; Tue, 16 Jun 2026 10:47:07 -0500 (CDT) (envelope-from mgrooms@shrew.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shrew.net; s=default; t=1781624827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vgOYULBiJwaa1iBREdCEpF+7GKxmpRA0xH961drRsQ8=; b=bhfdB/RZ+57qmV1NZW++jrHFfIZlrorwqc1emcoXSdF9+zU/oXMmTZxeJ2rPEhfJHm130S BEGqyc3laP54tfGWLkelhSlvspEqWZKj4mUp2NX/QR+EBUUcgKr2jksGP71nDZ6NXS7tkK lPlnzYo5EBUGjdTXZ5aZvqydKlmKSxlEF2oPj1IBfm70E6leSq7YI929ZsXb9KUwLT2IJW senKahp8S1f6zpMg4L3dNMcfOCTc0RvEPVuZLJ+hkBOG1Mf0ZU9Nz/WmsggrkejQc2nJBp 0aejAdHph5pjuWStqba/dkr6OVJGUqXCmbM+7NjNCr0+YQO4sftJs23GjTDw5g== Received: from [10.22.200.32] (unknown [136.60.75.165]) by mail.shrew.net (Postfix) with ESMTPSA id CBDFA3AB05 for ; Tue, 16 Jun 2026 10:47:07 -0500 (CDT) Message-ID: <381ad530-f921-496d-b636-14ad28aa1e2d@shrew.net> Date: Tue, 16 Jun 2026 10:47:01 -0500 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 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?Re=3A_**=5BHelp=5D_bhyve=3A_bootrom=5Falloc=3A_vm=5Fmmap?= =?UTF-8?Q?=5Fmapseg=3A_Invalid_argument_=E2=80=94_NVIDIA_passthrough_with_C?= =?UTF-8?Q?orvin=27s_branch_on_FreeBSD_15=2E0**?= To: virtualization@freebsd.org References: <1bbf28a7-7025-4d83-937d-72d8583048ca@shrew.net> Content-Language: en-US From: Matthew Grooms In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[shrew.net:s=default]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:19969, ipnet:204.27.56.0/21, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[shrew.net]; MLMMJ_DEST(0.00)[virtualization@freebsd.org]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[virtualization@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[shrew.net:+] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4gfrw66Qg5z48MQ Thanks Corvin. The passthrough feature appears to be working well. I appreciate the time and effort you've put into this. Once passed, I can use the device in a Debian 13 guest to execute cuda workloads. There do appear to be a few issues: 1) The nvidia device is always claimed as the primary GPU by the guest. 2) The guest hangs on shutdown and/or reboot. This only happens when the GPU is passed through. The first issue prevents me from performing a device reset if the GPU gets wedged in a CUDA operation. Reboot required. The second issue prevents a clean reboot ( always a dirty FS at startup ). Any ideas how to force UEFI to prefer the virtual frame buffer device? I've tried everything I can think of but no luck so far. Thanks again, -Matthew On 6/8/26 01:39, Corvin Köhne wrote: > On Fri, 2026-06-05 at 11:20 -0500, Matthew Grooms wrote: >> On 6/5/26 01:34, Corvin Köhne 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. >> I was about to attempt this myself. Are all the required patches present >> in 14.4 as well? >> >> Thanks, >> >> -Matthew >> > Yes, the required patch is present in 14.4 as well. > >