From nobody Wed Dec 20 19:58:11 2023 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 4SwPVq3sThz55HcB for ; Wed, 20 Dec 2023 19:57:55 +0000 (UTC) (envelope-from Stephan.Althaus@Duedinghausen.eu) Received: from mo4-p05-ob.smtp.rzone.de (mo4-p05-ob.smtp.rzone.de [81.169.146.183]) (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 (2048 bits) client-digest SHA256) (Client CN "*.smtp.rzone.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SwPVp24yRz3Lwx for ; Wed, 20 Dec 2023 19:57:54 +0000 (UTC) (envelope-from Stephan.Althaus@Duedinghausen.eu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hoewweken.de header.s=strato-dkim-0002 header.b=P+7TlcHk; dkim=pass header.d=hoewweken.de header.s=strato-dkim-0003 header.b=9dO8DvxH; spf=none (mx1.freebsd.org: domain of Stephan.Althaus@Duedinghausen.eu has no SPF policy when checking 81.169.146.183) smtp.mailfrom=Stephan.Althaus@Duedinghausen.eu; arc=pass ("strato.com:s=strato-dkim-0002:i=1"); dmarc=none ARC-Seal: i=1; a=rsa-sha256; t=1703102271; cv=none; d=strato.com; s=strato-dkim-0002; b=jL0vhRWdrPG1U18SGeMNGaizh2btCvFWWCJxWYVn+JeiVUwmxYDZoKqrFCmcetIKNb gojGLzUI9DRq7vlT57h1Nz87REvJmSTC6VyYyoEi8N0qSsD60X6dTLN+h/FVCv34am5m As/zmvw3isDsTnnb2xgW3Sg7oIsNQGJc+ly24wVPyw3zXeiVgoAS8Op3piDETITeNhtG RtttM04XZ2o2wCr7W0f1+/hcU7FgnlEhv/q0mnI/8CLuI2cVkxrxgcl33w+tZ3Y1hu0C GJSRVk3UGjkWF7MoH9YFECNdtnGWcAKJPt/4q3LZWaY2i4Hr53qoyPGMnpDZYAON2HAm dOEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1703102271; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=g53SQTTYolt9Q60F/V/b/3WgASnpUKp7N1Vqpp9en0w=; b=NuWHoyDIkqHj/S+796RCej6UBs/y6auhFj2hpt6btEhMEBIW5G5XNQCo6s4HF9K331 K7t0aIY0jlOU9KuqVCONckE3jRgFU0lyKezBpXlN6LmAp9orztRF5PE8OwoYN3EsXs5W g9Op7ZYNPa9sZCilrgpfnhvP6cWfeKRqx9FVSJt8Ze9RKsJbiELmIUoiL3Z/ACvmmm0v //xLqLWw6nH9Opf3LP5tWUboo6svDLxn7r9djF1zlITpJ2kW7Dts08E+j1WlrNwFBzRe fvu5qzmaf1E0TnRd/GvD6JNoX3DEI9AxxlqQqRKmGJGweq9deTn6nYUZcBJxpOQci8jz +Xqw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1703102271; s=strato-dkim-0002; d=hoewweken.de; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=g53SQTTYolt9Q60F/V/b/3WgASnpUKp7N1Vqpp9en0w=; b=P+7TlcHkKWoNv3wZs/o4iBmh+GHXF37H5E+o4Jsq3E+SQBDwmlWVpI6lj+5EVH5Has 92zR3dpT8NZIQJT/TeqtQ4NTuSoP/G7NBRn/HJVfdmdWfDlSmb71PIahazizRbk5uonQ I7emTr9gGII0gWeFkpTiMyl53XBGi8H4sCFrPH+xgnaCspl7eiyFX8GRhUR+vPCavKZD FpnM8FjuEhQRbVijqS460NvO8AEp2ctM0Bs3CbjsnVW3sDHSZL8Q8nNnQhMK/lHhQNw5 C90S1XGnwJXdBIeeYIBmwLegjnSJiwJxA9dony1SqDRJUvK3L6v67F6PKiYehyFw2Bfk kLqQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1703102271; s=strato-dkim-0003; d=hoewweken.de; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=g53SQTTYolt9Q60F/V/b/3WgASnpUKp7N1Vqpp9en0w=; b=9dO8DvxHGC4AtipQyjWr0/M8r2mZtUXnjSx2GFUo0qa1/dpdk11/sBOgFI/RQt4UlW HQTVOpyECNppoXx1YmBw== X-RZG-AUTH: ":O2kGeEG7b/pS1EW2TmikjLDsYYueHLp2aWg0q38nsxN1mOntnRORP93PLpfReKNjbyYtOAegfjheaQ4=" X-RZG-CLASS-ID: mo05 Received: from www.duedinghausen.eu by smtp.strato.de (RZmta 49.10.0 DYNA|AUTH) with ESMTPSA id 9f0670zBKJvpYkz (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Wed, 20 Dec 2023 20:57:51 +0100 (CET) Received: from [192.168.2.63] (speedport.ip [192.168.1.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) (Authenticated sender: steven) by www.duedinghausen.eu (Postfix) with ESMTPSA id 6627912967E for ; Wed, 20 Dec 2023 20:57:22 +0100 (CET) Content-Type: multipart/alternative; boundary="------------CkjYLm7QgfR5C6Sb0fBllNV3" Message-ID: <6837a1f2-9b28-4a49-8db6-f410853518e2@Duedinghausen.eu> Date: Wed, 20 Dec 2023 20:58:11 +0100 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bhyve nvidia gtx-1650 mobile passthru on win11 To: virtualization@freebsd.org References: <101df7552fd1673ddc73e14daf518630402129c4.camel@FreeBSD.org> Content-Language: en-US From: Stephan Althaus In-Reply-To: Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.39 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; ARC_ALLOW(-1.00)[strato.com:s=strato-dkim-0002:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[hoewweken.de:s=strato-dkim-0002,hoewweken.de:s=strato-dkim-0003]; RCVD_IN_DNSWL_LOW(-0.10)[81.169.146.183:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; MLMMJ_DEST(0.00)[virtualization@freebsd.org]; ASN(0.00)[asn:6724, ipnet:81.169.144.0/22, country:DE]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_SPF_NA(0.00)[no SPF record]; DKIM_TRACE(0.00)[hoewweken.de:+]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[duedinghausen.eu]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[virtualization@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4SwPVp24yRz3Lwx X-Spamd-Bar: ---- This is a multi-part message in MIME format. --------------CkjYLm7QgfR5C6Sb0fBllNV3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/20/23 11:02, Nuno Teixeira wrote: > Hi Corvin, > > intel: > Requires a patched EDKII firmware [3]. Unfortunately, it's not merged > yet. Btw. even if you only have an Intel card available you can use it > for GPU passthrough. > > > I'm runing a laptop with intel graphics dynamics + dedicated nvidia > (Lenovo Legion 5i) and I'm thinking giving a try intel passtrhu: > > ### > vgapci1@pci0:*0:2:0*:     class=0x030000 rev=0x05 hdr=0x00 > vendor=0x8086 device=0x9bc4 subvendor=0x17aa subdevice=0x3fa5 >     vendor     = 'Intel Corporation' >     device     = 'CometLake-H GT2 [UHD Graphics]' >     class      = display >     subclass   = VGA > > vgapci0@pci0:*1:0:0*:     class=0x030000 rev=0xa1 hdr=0x00 > vendor=0x10de device=0x1f99 subvendor=0x17aa subdevice=0x3fa5 >     vendor     = 'NVIDIA Corporation' >     device     = 'TU117M [GeForce GTX 1650 Mobile / Max-Q]' >     class      = display >     subclass   = VGA > ### > > /boot/loader.conf: > vmm_load="YES" > pptdevs="*0/2/0*" > > etc/X11/xorg.conf.d/20-drivers.conf: > Section "Device" >     Identifier "Card0" >     Driver "nvidia" >     BusID  "PCI:*1:0:0*" > EndSection > > bhyve: > -s 6:0,passthru,*0/2/0* > (vm-bhyve vm config: >  passthru0="*0/2/0*") > > I've already did this: > - ppt gets configured for intel > - xorg doesn't start with xorg "nvidia" config > - xorg starts with scfb (with empty xorg config) > - start vm and crashes my laptop > > I'm just looking for the correct setup to try it again when EDKII > firmware gets updated/patched. > > Thanks, > -- > Nuno Teixeira > FreeBSD Committer (ports) Hi Nuno! If the laptops GPU setup is like "optimus" you will encounter problems runing Xorg on your nvidia GPU. I have a DELL 7720 with dedicated physical ports from the nvidia card to the display output(s), running Xorg on nvidia here but having the intel part _disabled_ in BIOS. These mobile dual GPU setups aren't that easy like multiple PCIe cards in a desktop "PC"... But maybe there is a solution for your laptop somewhere.. Regards, Stephan --------------CkjYLm7QgfR5C6Sb0fBllNV3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 12/20/23 11:02, Nuno Teixeira wrote:
Hi Corvin,

intel:
Requires a patched EDKII firmware [3]. Unfortunately, it's not merged
yet. Btw. even if you only have an Intel card available you can use it
for GPU passthrough.

I'm runing a laptop with intel graphics dynamics + dedicated nvidia (Lenovo Legion 5i) and I'm thinking giving a try intel passtrhu:

###
vgapci1@pci0:0:2:0:     class=0x030000 rev=0x05 hdr=0x00 vendor=0x8086 device=0x9bc4 subvendor=0x17aa subdevice=0x3fa5
    vendor     = 'Intel Corporation'
    device     = 'CometLake-H GT2 [UHD Graphics]'
    class      = display
    subclass   = VGA

vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1f99 subvendor=0x17aa subdevice=0x3fa5
    vendor     = 'NVIDIA Corporation'
    device     = 'TU117M [GeForce GTX 1650 Mobile / Max-Q]'
    class      = display
    subclass   = VGA
###

/boot/loader.conf:
vmm_load="YES"
pptdevs="0/2/0"

etc/X11/xorg.conf.d/20-drivers.conf:
Section "Device"
    Identifier "Card0"
    Driver "nvidia"
    BusID  "PCI:1:0:0"
EndSection

bhyve:
-s 6:0,passthru,0/2/0
(vm-bhyve vm config:
 passthru0="0/2/0")

I've already did this: 
- ppt gets configured for intel
- xorg doesn't start with xorg "nvidia" config
- xorg starts with scfb (with empty xorg config)
- start vm and crashes my laptop

I'm just looking for the correct setup to try it again when EDKII firmware gets updated/patched.

Thanks,
--
Nuno Teixeira
FreeBSD Committer (ports)

Hi Nuno!
If the laptops GPU setup is like "optimus" you will encounter problems runing Xorg on your nvidia GPU.
I have a DELL 7720 with dedicated physical ports from the nvidia card to the display output(s), running Xorg on nvidia here but having the intel part _disabled_ in BIOS.
These mobile dual GPU setups aren't that easy like multiple PCIe cards in a desktop "PC"...

But maybe there is a solution for your laptop somewhere..

Regards,
Stephan

--------------CkjYLm7QgfR5C6Sb0fBllNV3--