Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 15:42:21 +0200
From:      Mario Marietto <marietto2008@gmail.com>
To:        Jonathan Vasquez <jon@xyinn.org>,  FreeBSD virtualization <freebsd-virtualization@freebsd.org>,  =?UTF-8?Q?Corvin_K=C3=B6hne?= <c.koehne@beckhoff.com>
Subject:   Re: bhyve: Warning: Unable to reuse host address of Graphics Stolen Memory. GPU passthrough might not work properly. bhyve: gvt_d_setup_opregion: Unable to get OpRegion base and length bhyve: gvt_d_init: Unable to setup OpRegion device emulation initialization error: Operation not supported by device
Message-ID:  <CA%2B1FSiiA8LSpLGECy22vUZUX2hP%2B-74Yzm_BQ2527h9METqPwQ@mail.gmail.com>
In-Reply-To: <j0xhUJ4NYYkhKI94HuZc_5_W-v5r_qYsqZeVvE3t1wol9CBDYMUayoM7ULRCnuSvPBQY7Uso4J9LCfXWkvb_IDWj4zP0Doxodnrd-uAtDO4=@xyinn.org>
References:  <CA%2B1FSiiyU1kqCiD0Cui%2BMnzeuu%2BMAc50mVbqKMdSS7wXi9cFpg@mail.gmail.com> <j0xhUJ4NYYkhKI94HuZc_5_W-v5r_qYsqZeVvE3t1wol9CBDYMUayoM7ULRCnuSvPBQY7Uso4J9LCfXWkvb_IDWj4zP0Doxodnrd-uAtDO4=@xyinn.org>

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

[-- Attachment #1 --]
It's not used by the host. FreeBSD is using the geforce 1060. And on the
BIOS I have set up the 1060 as default. I know that I can't pass through a
gpu that I'm using. And the third gpu is the geforce rtx 2080 ti that I can
actually pass.

Actually I have 3 gpus :

ppt4@pci0:0:2:0:        class=0x038000 rev=0x02 hdr=0x00 vendor=0x8086
device=0x3e98 subvendor=0x1458 subdevice=0xd000
   vendor     = 'Intel Corporation'
   device     = 'CoffeeLake-S GT2 [UHD Graphics 630]'
   class      = display

vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1c02 subvendor=0x19d
a subdevice=0x2438
   vendor     = 'NVIDIA Corporation'
   device     = 'GP106 [GeForce GTX 1060 3GB]'
   class      = display
   subclass   = VGA

hdac0@pci0:1:0:1:       class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x10f1 subvendor=0x19d
a subdevice=0x2438
   vendor     = 'NVIDIA Corporation'
   device     = 'GP106 High Definition Audio Controller'
   class      = multimedia
   subclass   = HDA

ppt0@pci0:2:0:0:        class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1e04 subvendor=0x19d
a subdevice=0x2503
   vendor     = 'NVIDIA Corporation'
   device     = 'TU102 [GeForce RTX 2080 Ti]'
   class      = display
   subclass   = VGA

ppt1@pci0:2:0:1:        class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x10f7 subvendor=0x19d
a subdevice=0x2503
   vendor     = 'NVIDIA Corporation'
   device     = 'TU102 High Definition Audio Controller'
   class      = multimedia
   subclass   = HDA

ppt2@pci0:2:0:2:        class=0x0c0330 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1ad6 subvendor=0x19d
a subdevice=0x2503
   vendor     = 'NVIDIA Corporation'
   device     = 'TU102 USB 3.1 Host Controller'
   class      = serial bus
   subclass   = USB

ppt3@pci0:2:0:3:        class=0x0c8000 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1ad7 subvendor=0x19d
a subdevice=0x2503
   vendor     = 'NVIDIA Corporation'
   device     = 'TU102 USB Type-C UCSI Controller'
   class      = serial bus

As you can see,I'm using the ppt driver on the gpus that I'm not using.

Il giorno ven 29 lug 2022 alle ore 14:58 Jonathan Vasquez <jon@xyinn.org>
ha scritto:

> I thought in general we couldn't pass the GPU if it was being used by the
> host? (Thus you would need to have two GPUs, one to allow the host to
> display its output and one to passthrough. Unless the host is completely
> headless).
>
>
> Sent from ProtonMail mobile
>
>
>
> -------- Original Message --------
> On Jul 29, 2022, 02:38, Mario Marietto < marietto2008@gmail.com> wrote:
>
>
> Hello.
>
> I've tried to passthru my CoffeeLake-S GT2 [UHD Graphics 630] on a Linux
> VM but it failed. This graphic card :
>
> ppt4@pci0:0:2:0:        class=0x038000 rev=0x02 hdr=0x00 vendor=0x8086
> device=0x3e98 subvendor=0x1458 subdevice=0xd000
>    vendor     = 'Intel Corporation'
>    device     = 'CoffeeLake-S GT2 [UHD Graphics 630]'
>    class      = display
>
> below there are the bhyve parameters that I've used :
>
> bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
> -s 0,hostbridge \
> -s 1,nvme,/dev/$vmdisk0,bootindex=1 \
> -s 2,ahci-hd,/dev/$vmdisk2 \
> -s 3,ahci-hd,/dev/$vmdisk4 \
> -s 4,passthru,0/2/0 \
> -s 7,virtio-net,tap4 \
> -s 10,hda,play=/dev/dsp,rec=/dev/dsp \
> -s 29,fbuf,tcp=0.0.0.0:5904,w=1500,h=950 \
> -s 30,xhci,tablet \
> -s 31,lpc \
> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
> vm4 < /dev/null & sleep 2 && vncviewer 0:4
>
> this is the error I get :
>
> bhyve: Warning: Unable to reuse host address of Graphics Stolen Memory.
> GPU passthrough might not work properly.
> bhyve: gvt_d_setup_opregion: Unable to get OpRegion base and length
> bhyve: gvt_d_init: Unable to setup OpRegion
> device emulation initialization error: Operation not supported by device
>
> Should I apply some patches ? I know for sure that I can pass through this
> kind of gpu,using the Corvin patches,but I don't know if I have found a bug
> that should be fixed. Let me know.
>
> --
> Mario.
>
>

-- 
Mario.

[-- Attachment #2 --]
<div dir="ltr"><div>It&#39;s not used by the host. FreeBSD is using the geforce 1060. And on the BIOS I have set up the 1060 as default. I know that I can&#39;t pass through a gpu that I&#39;m using. And the third gpu is the geforce rtx 2080 ti that I can actually pass. <br></div><div><br></div><div>Actually I have 3 gpus :</div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">ppt4@pci0:0:2:0:        class=0x038000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e98 subvendor=0x145</span>8 subdevice=0xd000
<br>    vendor     = &#39;Intel Corporation&#39;
<br>    device     = &#39;CoffeeLake-S GT2 [UHD Graphics 630]&#39;
<br>    class      = display</span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><br></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">vgapci0@pci0:1:0:0:     class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1c02 subvendor=0x19d</span><br>a subdevice=0x2438
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;GP106 [GeForce GTX 1060 3GB]&#39;
<br>    class      = display
<br>    subclass   = VGA
<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">hdac0@pci0:1:0:1:       class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x10f1 subvendor=0x19d<br>a subdevice=0x2438
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;GP106 High Definition Audio Controller&#39;
<br>    class      = multimedia
<br>    subclass   = HDA
<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">ppt0@pci0:2:0:0:        class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e04 subvendor=0x19d<br>a subdevice=0x2503
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;TU102 [GeForce RTX 2080 Ti]&#39;
<br>    class      = display
<br>    subclass   = VGA
<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">ppt1@pci0:2:0:1:        class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x10f7 subvendor=0x19d<br>a subdevice=0x2503
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;TU102 High Definition Audio Controller&#39;
<br>    class      = multimedia
<br>    subclass   = HDA
<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">ppt2@pci0:2:0:2:        class=0x0c0330 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad6 subvendor=0x19d<br>a subdevice=0x2503
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;TU102 USB 3.1 Host Controller&#39;
<br>    class      = serial bus
<br>    subclass   = USB
<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">ppt3@pci0:2:0:3:        class=0x0c8000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad7 subvendor=0x19d<br>a subdevice=0x2503
<br>    vendor     = &#39;NVIDIA Corporation&#39;
<br>    device     = &#39;TU102 USB Type-C UCSI Controller&#39;
<br>    class      = serial bus<br>
<br></span></div><div><span style="font-family:monospace">As you can see,I&#39;m using the ppt driver on the gpus that I&#39;m not using. <br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 29 lug 2022 alle ore 14:58 Jonathan Vasquez &lt;<a href="mailto:jon@xyinn.org">jon@xyinn.org</a>&gt; ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I thought in general we couldn&#39;t pass the GPU if it was being used by the host? (Thus you would need to have two GPUs, one to allow the host to display its output and one to passthrough. Unless the host is completely headless).<br><br><br>Sent from ProtonMail mobile<br><br><br><br>-------- Original Message --------<br>On Jul 29, 2022, 02:38, Mario Marietto &lt; <a href="mailto:marietto2008@gmail.com" target="_blank">marietto2008@gmail.com</a>&gt; wrote:<blockquote><br><div dir="ltr"><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">Hello.</span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">I&#39;ve tried to passthru my <span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace">CoffeeLake-S GT2 [UHD Graphics 630] on a Linux VM but it failed. This graphic card :<br></span></span></span></span></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">ppt4@pci0:0:2:0:        class=0x038000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e98 subvendor=0x145</span>8 subdevice=0xd000
<br>    vendor     = &#39;Intel Corporation&#39;
<br>    device     = &#39;CoffeeLake-S GT2 [UHD Graphics 630]&#39;
<br>    class      = display<br>
<br></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace">below there are the bhyve parameters that I&#39;ve used :</span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><br></span></span></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
</span><br>-s 0,hostbridge \
<br>-s 1,nvme,/dev/$vmdisk0,bootindex=1 \
<br>-s 2,ahci-hd,/dev/$vmdisk2 \
<br>-s 3,ahci-hd,/dev/$vmdisk4 \
<br>-s 4,passthru,0/2/0 \
<br>-s 7,virtio-net,tap4 \
<br>-s 10,hda,play=/dev/dsp,rec=/dev/dsp \
<br>-s 29,fbuf,tcp=<a href="http://0.0.0.0:5904" target="_blank">0.0.0.0:5904</a>,w=1500,h=950 \
<br>-s 30,xhci,tablet \
<br>-s 31,lpc \
<br>-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
<br>vm4 &lt; /dev/null &amp; sleep 2 &amp;&amp; vncviewer 0:4</span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><br></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace">this is the error I get :</span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-family:monospace"><br></span></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">bhyve: Warning: Unable to reuse host address of Graphics Stolen Memory. <br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">GPU passthrough might not wo</span></span><span style="font-family:monospace">rk properly.
</span><br><span style="font-family:monospace"></span></div><span style="font-family:monospace">bhyve: gvt_d_setup_opregion: Unable to get OpRegion base and length
<br>bhyve: gvt_d_init: Unable to setup OpRegion
<br>device emulation initialization error: Operation not supported by device<br></span><div><br></div><div>Should I apply some patches ? I know for sure that I can pass through this kind of gpu,using the Corvin patches,but I don&#39;t know if I have found a bug that should be fixed. Let me know.<font color="#888888"><br></font></div><br><div>-- </div><div dir="ltr">Mario.<br></div></div>
</blockquote></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Mario.<br></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSiiA8LSpLGECy22vUZUX2hP%2B-74Yzm_BQ2527h9METqPwQ>