From nobody Fri Aug 29 17:07:21 2025 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 4cD4VQ1hXwz65sNX for ; Fri, 29 Aug 2025 17:08:46 +0000 (UTC) (envelope-from nospam@ofloo.net) Received: from loki.ofloo.net (loki.ofloo.net [IPv6:2001:470:7fdf:cafe:5a9c:fcff:fe08:28f7]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "loki.ofloo.net", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cD4VP6sJFz3FFq for ; Fri, 29 Aug 2025 17:08:45 +0000 (UTC) (envelope-from nospam@ofloo.net) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:fc03:1337:dead:cafe:c13e:b460:e22d:c2be] ([IPv6:fc03:1337:dead:cafe:c13e:b460:e22d:c2be]) by loki.ofloo.net (8.18.1/8.18.1) with ESMTPS id 57TH7LCZ039158 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 29 Aug 2025 19:07:21 +0200 (CEST) (envelope-from nospam@ofloo.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ofloo.net; s=default; t=1756487243; bh=TazwHcudm3uQot4SoGviWg21H3Mo356sMlC/9SuCWQA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=RWzOoWLSFhBzHKNTeCuxhFv1YK3alzInlgWJjfuJOKx09CB6/p9DLI7MkBqs2LITQ ApKH8MDdY3EJDhRDZmk0oMnYcBuRBb+A69LxiJJqP637cYFiU2V/o/sRqMNjobYBbs RZ8euteJSu8JYEfccFZalmHOU43xl9I7ZStXcqNeqrYzMEeIbjqU8Av2zkn+g3zqrT IJNoUBWmfywO1cb4JPgeHIrgnDx8k9iUfozEXTm3AVhV1Wg29ssXo3iZEJBClmXTWj PniUchTRyms/NjPYv6DQGpS4V3MR1uCMs1oAFUaQyiqLINjTRFmO/xhfQtlY1Z8fin 7ga7g0fBX1ytKpmHaSjpF1wRxNtKBS000NHOqSMRLu8g+DWlmRI1q75Pasuapbnvsl HrkRR4YcMiMC7c7bBFXnCJpMK77eiDLu6CTMfXoVUVGJcKmZtMqRv/LPTNxdFb2FbC BrmhbfRZZVyC0y0FapuT/X2cplNdGGDgMGonbC2x4GWM0TiIns9Wrun7hus9vxu2T0 /olQkb6SItrJb92g1D2uX94WZM05tg2IxTPsZyK+NwlSks3HkmMvLcfZ4Am8AuG8q3 9o6RcpqkNham+hDm+rC+J8DkFVkZ7DLS7r69Ur5F14hgxe79SOmwLuyDGqfe4pV3TW FiT89h/WdL9SVQEDgAmC1bHk= Message-ID: <17b83af1-06c7-4e2d-9445-034444b78342@ofloo.net> Date: Fri, 29 Aug 2025 19:07:21 +0200 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 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: GPU Passthrough on FreeBSD 14.3(AMD Radeon RX 6700 XT and Debian Linux 12.11) To: Mark Millard , peter.garshtja@ambient-md.com, Virtualisation on FreeBSD References: <3F9D5D27-B5BA-408D-B577-9625080838BB.ref@yahoo.com> <3F9D5D27-B5BA-408D-B577-9625080838BB@yahoo.com> Content-Language: en-US, nl-BE From: Wouter Snels In-Reply-To: <3F9D5D27-B5BA-408D-B577-9625080838BB@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-99.6 required=5.0 tests=ALL_TRUSTED,HELO_NO_DOMAIN, RDNS_NONE,TW_KL,USER_IN_WELCOMELIST,USER_IN_WHITELIST autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on loki.ofloo.net X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cD4VP6sJFz3FFq I haven't passed through a gpu, not sure how a thunderbolt gpu shows up but, .. you need to tell freebsd not to attach to that gpu, .. put something like this in /boot/loader.conf, the numbers below depend on what pci slot your gpu is. #pptdevs="179/0/0 179/0/1" Note your host system requires a gpu for this to work. Then pass it on to bhyve. For me the easiest way to manage bhyve from console is through vm-bhyve. It also has an command vm passthru # vm passthru DEVICE     BHYVE ID     READY        DESCRIPTION hostb0     0/0/0        No           Sky Lake-E DMI3 Registers ioat0      0/4/0        No           Sky Lake-E CBDMA Registers ioat1      0/4/1        No           Sky Lake-E CBDMA Registers ioat2      0/4/2        No           Sky Lake-E CBDMA Registers If you done it correctly Ready will show yes If you check their example config .. less /usr/local/share/examples/vm-bhyve/config.sample # passthru0 # Add a pass-through PCI device to the virtual machine. This allows the guest # to access a hardware device no differently than if it was running on bare # metal. The value of this option is the B/S/F of the appropriate device. # e.g "3/0/0" # # The slot to use in bhyve can be specified as below. This example will # force the host device 6/0/0 to use slot 2:0 in the guest # # passthru0="6/0/0=2:0" # # Please note that in order to stop the bhyve host from attaching to the device, # there are some steps required to reserve the device in /boot/loader.conf. # # The 'vm passthru' command provides a convinient way of seeing the BSF of each # device in your system, and whether any have been reserved ready for use # in bhyve # # More details can be found in the FreeBSD bhyve wiki pages # passthru0="" And yes your boot loader in your config needs to be uefi, with thunderbolt egpu you might need to pass through the entire controller just like when you want to pass through an usb device, there is ways around that but i doubt this can be done with an egpu. Regards, .. Op 29/08/2025 om 05:25 schreef Mark Millard: > Petru Garstea write on > Date: Thu, 28 Aug 2025 17:42:18 UTC : > >> I want to mention also that GPU is connected as eGPU via thunderbolt3. > > [Do not take the below as claims of an expert. So > believe folks with expertise if they report I'm > wrong about anything.] > > Mostly this note is about watching out for assuming > too much of an analogous context with folks that do > not have thunderbolt involved at all in their > context. > > If any aspect of what you are doing requires FreeBSD to > support thunderbolt3: I'm not aware that any version > of FreeBSD claims to support any version of thunderbolt > yet. Also, if I understand right, the effort is going > into thunderbolt4+ without initially having general > backward compatibility with thunderbolt3. (That, of > itself, makes the thunderbolt4 incomplete, if I > understand right.) > > As I understand, the details even involve if the EFI > software has builtin support for parts of the handling > vs. if the operating system kernel must do those support > activities on on its own. Sometimes some things appear > to work for some contexts because of the EFI dealing > with aspects that the kernel does not deal with (yet). > > (As I understand, FreeBSD does not yet face the > alternative of both the EFI and the kernel being able > to support such and guiding which way things should > go.) > > === > Mark Millard > marklmi at yahoo.com >