Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2023 18:09:40 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        =?UTF-8?Q?Corvin_K=C3=B6hne?= <C.Koehne@beckhoff.com>,  FreeBSD virtualization <freebsd-virtualization@freebsd.org>,  freebsd-hackers <freebsd-hackers@freebsd.org>, Peter Grehan <grehan@freebsd.org>,  - - <nevilad@yahoo.com>
Subject:   Re: devctl: Failed to detach pci0:2:0:0: Device busy
Message-ID:  <CA%2B1FSiijaRF%2BAwP8=9Ob%2BtS2pkakxnZ81h9zV-DwUwAJB=p%2BrQ@mail.gmail.com>
In-Reply-To: <CA%2B1FSih8pyusoaFqJ747CGOp7j3k5Fk5y=MBke%2BWO%2Bd7cVO%2BZw@mail.gmail.com>
References:  <CA%2B1FSigvQmRR5sehhvQx7Rg0fFqGKV2EP%2Bz85xGBnr=KxxtC6Q@mail.gmail.com> <CA%2B1FSijKArcv4CNf-9Y_DMPbgvXTyiF2v%2B4nj=i4rCzVv2B-PA@mail.gmail.com> <15af67efdab54e81bee59aedd2598839@beckhoff.com> <CA%2B1FSiiE_C-abp5bVyRBHXcRP=9zZ8ci6Cwrt2qOZtj6X99Aiw@mail.gmail.com> <57a5ccfd7c3148f99da730b076a85e01@beckhoff.com> <CA%2B1FSijOjP=gbwYDPwACT4AtOrzTARf%2BWCpHOWnBL6Hkr89XAA@mail.gmail.com> <dc7d6e13ad4b43fa8f14a8a52b21861d@beckhoff.com> <CA%2B1FSih_%2Bj-FZs9P5D_ZbmQnwSL0T_koEDEDRdpQwasx%2BCG15Q@mail.gmail.com> <d02925bf51684d3da9b3c16425f7333c@beckhoff.com> <CA%2B1FSijGJ6TPW9ci-sOgN3HdKqyvE3q9uUW7WEEwRBOV8442FA@mail.gmail.com> <CA%2B1FSih8pyusoaFqJ747CGOp7j3k5Fk5y=MBke%2BWO%2Bd7cVO%2BZw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000066e96a05f3cec1de
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello, bhyve and / or FreeBSD developers and lovers.

I=E2=80=99m trying to pass my GTX 1060 from my host os (FreeBSD 13.1-RELEAS=
E) to a
Linux/Ubuntu VM virtualized with bhyve,but unsuccessfully. Last year I
tried to do the same with another GPU that I have on my PC,the RTX 2080 ti
and with the help of @generix
<https://forums.developer.nvidia.com/u/generix>,after a tricky trouble
shooting we have been able to do that. Point is that the same patches which
worked (and that works right now) for the 2080 ti aren=E2=80=99t working fo=
r the
GTX 1060. The error that I see is the same that I saw when I have
cooperated with Generix for passing through the 2080 ti. I really would
like to know which differences there are between the two gpus because for
the 1060 I'm using the same new driver that I=E2=80=99m using for the 2080 =
ti and
the latter one can be passed without problems. Anyway,I would know what I
should do to fix that error. For this matter I've created a new post on the
nvidia forum. If someone would like to give it a look,it is here :
https://forums.developer.nvidia.com/t/rminitadapter-failed-error-produced-w=
hen-i-try-to-passthru-my-gtx-1060-to-a-linux-ubuntu-bhyve-vm-instead-my-rtx=
-2080ti-is-passed-correctly/241594

Il giorno ven 3 feb 2023 alle ore 15:21 Mario Marietto <
marietto2008@gmail.com> ha scritto:

> Very interesting behavior. I've added this new line in /etc/rc.conf :
> (until some minutes ago I didn't use it because I was using the intel
> driver,installed by the package : xf86-video-intel-2.99.917.916_2,1)
>
> kld_list=3D"i915kms acpi_video"
>
> and this line in /boot/loader.conf :
>
> pptdevs=3D"1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3 5/0/0"
>
> and boom. pptdevs worked again:
>
> # pciconf -l
>
> ppt0@pci0:1:0:0:        class=3D0x030000 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x1c02 subvendor=3D0x19da subdevice=3D0x2438
> ppt1@pci0:1:0:1:        class=3D0x040300 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x10f1 subvendor=3D0x19da subdevice=3D0x2438
> ppt2@pci0:2:0:0:        class=3D0x030000 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x1e04 subvendor=3D0x19da subdevice=3D0x2503
> ppt3@pci0:2:0:1:        class=3D0x040300 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x10f7 subvendor=3D0x19da subdevice=3D0x2503
> ppt4@pci0:2:0:2:        class=3D0x0c0330 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x1ad6 subvendor=3D0x19da subdevice=3D0x2503
> ppt5@pci0:2:0:3:        class=3D0x0c8000 rev=3D0xa1 hdr=3D0x00 vendor=3D0=
x10de
> device=3D0x1ad7 subvendor=3D0x19da subdevice=3D0x2503
> ppt6@pci0:5:0:0:        class=3D0x0c0330 rev=3D0x10 hdr=3D0x00 vendor=3D0=
x1b73
> device=3D0x1100 subvendor=3D0x1b73 subdevice=3D0x1100
>
> So,maybe there is some incompatibility between the intel and the pptdevs
> driver ? take also in consideration that on xorg.cong I'm still using the
> intel driver :
>
> Section "Device"
>        Identifier  "Card0"
>        Driver      "intel"
>        BusID       "PCI:0:2:0"
> EndSection.
>
> It's a confusing situation.
>
> Il giorno ven 3 feb 2023 alle ore 14:13 Mario Marietto <
> marietto2008@gmail.com> ha scritto:
>
>> I've sent an email to the hackers ML with this content :
>>
>> > On 30 Jan 2023, at 05:37, Mario Marietto <marietto2008@gmail.com>
>> wrote:
>> > In some FreeBSD 13.1 machines I have the problem below,in some others =
I
>> don't have it. I would like to know what the causes could be and how to =
fix
>> it.
>> >
>> > root@marietto:/usr/home/marietto # devctl detach pci0:1:0:0
>> >
>> > devctl: Failed to detach pci0:1:0:0: Device busy
>> >
>> > root@marietto:/usr/home/marietto # devctl detach pci0:2:0:0
>> >
>> > devctl: Failed to detach pci0:2:0:0: Device busy
>> >
>> > Not even it works if instead of detach them, I try to attach them
>> directly to the ppt driver :
>> >
>> > root@marietto:/usr/home/marietto/bhyve/Files # devctl set driver
>> pci0:2:0:0 ppt
>> > devctl: Failed to set pci0:2:0:0 driver to ppt: Device busy
>> >
>> > root@marietto:/usr/home/marietto/bhyve/Files # devctl detach
>> pci0:2:0:0
>> > devctl: Failed to detach pci0:2:0:0: Device busy
>> >
>> > Pci addresses 1:0:0 and 2:0:0 belong to the two GPUs that I have on my
>> PC :
>> >
>> > vgapci0@pci0:1:0:0:     class=3D0x030000 rev=3D0xa1 hdr=3D0x00 vendor=
=3D0x10de
>> device=3D0x1c02 subvendor=3D0x19da subdevice=3D0x2438
>> > vgapci1@pci0:2:0:0:     class=3D0x030000 rev=3D0xa1 hdr=3D0x00 vendor=
=3D0x10de
>> device=3D0x1e04 subvendor=3D0x19da subdevice=3D0x2503
>> >
>> > Actually I have commented this line on /boot/loader.conf,because it
>> makes no difference if I keep it uncommented or not. It is totally ignor=
ed.
>> >
>> > #pptdevs=3D"1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3"
>>
>> and George replied to me like this :
>>
>> Do you have 'vmm_load=3D"YES"' in loader.conf?
>>
>> If not I am not sure it will have an effect - vmm must be loaded early
>> otherwise the card will be grabbed by the vgapci driver rather than be p=
ut
>> under ppt control.
>>
>> I think this is an interesting answer. Yes,I keep vmm_load=3D"YES" in
>> loader.conf,BUT putting the 4 slots under ppt control using the loader.c=
onf
>> did not work for me for months. We haven't taken this into consideration=
.
>> And you didn't reply when I've asked you if you have modified the bhyve
>> source code,because putting the pci addresses under ppt using the
>> loader.conf always worked for me. I would like to understand why it does
>> not work anymore. This is important to understand why I'm not able to
>> attach / detach the nVidia driver from the host to the guest os. And may=
be
>> George's consideration is relevant.
>>
>> Il giorno ven 3 feb 2023 alle ore 12:11 Corvin K=C3=B6hne <
>> C.Koehne@beckhoff.com> ha scritto:
>>
>>>
>>>    - ---> Figure out if you can blacklist your gpu in the nvidia
>>>    driver. So, the nVidia driver never gets attached to your device.
>>>
>>>
>>>    - nope. I need to attach the nVidia driver to my gpu if I want to
>>>    run stable diffusion + pytorch + cuda on the Linuxulator on FreeBSD.=
 I'm
>>>    thinking of installing Stable Diffusion within the Linux VM,instead =
of
>>>    doing it on FreeBSD.
>>>
>>>
>>>    - ---> Wait for drm drivers and use the nouveau driver. Nouveau
>>>    isn=E2=80=99t maintained by nVidia, so it=E2=80=99s more likely to g=
et fixed.
>>>
>>>
>>>    - The nouveau driver is always bugged and it never worked well. I
>>>    wonder if it is still supported. It has even limited features.
>>>
>>>
>>>
>>> Afaik, you don=E2=80=99t have other options, sry. I=E2=80=99m no gpu dr=
iver developer,
>>> so I can=E2=80=99t help you.
>>>
>>> Btw: Do you refer to linux nouveau or freebsd nouveau? Freebsd made muc=
h
>>> progress in porting linux drm to freebsd with 14.0. So, if latest linux
>>> nouveau fits your requirements, it=E2=80=99s likely that freebsd 14.0 m=
ay fit them
>>> too.
>>>
>>>
>>>
>>>    - Are the following commands enough to update the bhyve source code
>>>    on my machine ? take in consideration that I need to grab only your =
new
>>>    last patch.
>>>
>>>
>>>    - cd /usr/src
>>>
>>>
>>>    - git checkout -f origin/phab/corvink/13.1/nvidia-wip
>>>
>>>
>>>    - # cd /wherever/you/put/my/Makefile
>>>
>>> # make -j 8
>>>
>>>
>>>
>>> My latest patch is a mouse driver patch for the host. So, no, you have
>>> to use:
>>>
>>> cd /usr/src
>>>
>>> git fetch
>>>
>>> git checkout -f origin/phab/corvink/13.1/nvidia-wip
>>>
>>> make kernel
>>>
>>> reboot
>>>
>>>
>>>
>>>
>>>
>>> Best regards
>>>
>>> Corvin
>>>
>>>
>>>
>>>
>>>
>>> This email contains confidential information. If you have received it i=
n
>>> error, you must not read, use, copy or pass on this e-mail or its
>>> attachments.
>>> If you have received the e-mail in error, please inform me immediately
>>> by reply e-mail and then delete this e-mail from your system. Thank you
>>>
>>> Diese E-Mail enthaelt vertrauliche Informationen. Sollten Sie sie
>>> irrtuemlich erhalten haben, duerfen Sie diese E-Mail oder ihre Anhaenge
>>> nicht lesen, verwenden, kopieren oder weitergeben.
>>> Sollten Sie die Mail versehentlich erhalten haben, teilen Sie mir dies
>>> bitte umgehend per Antwort-E-Mail mit und loeschen Sie diese E-Mail dan=
n
>>> aus Ihrem System. Vielen Dank
>>>
>>> Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans
>>> Beckhoff
>>> Registered office: Verl, Germany | Register court: Guetersloh HRA 7075
>>>
>>>
>>
>> --
>> Mario.
>>
>
>
> --
> Mario.
>


--=20
Mario.

--00000000000066e96a05f3cec1de
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div></div><div><p>Hello, bhyve and / or FreeBSD developer=
s and lovers.<br></p><p>I=E2=80=99m trying to pass my GTX 1060 from my host=
 os (FreeBSD=20
13.1-RELEASE) to a Linux/Ubuntu VM virtualized with bhyve,but=20
unsuccessfully. Last year I tried to do the same with another GPU that I
 have on my PC,the RTX 2080 ti and with the help of <a class=3D"gmail-menti=
on" href=3D"https://forums.developer.nvidia.com/u/generix">@generix</a>,aft=
er
 a tricky trouble shooting we have been able to do that. Point is that=20
the same patches which worked (and that works right now) for the 2080 ti=20
aren=E2=80=99t working for the GTX 1060. The error that I see is the same t=
hat I
 saw when I have cooperated with Generix for passing through the 2080 ti. I=
 really would like to know which differences there are between the two gpus=
 because for the 1060=20
I&#39;m using the same new driver that I=E2=80=99m using for the 2080 ti an=
d the=20
latter one can be passed without problems. Anyway,I would know what=20
I should do to fix that error. For this matter I&#39;ve created a new post =
on the nvidia forum. If someone would like to give it a look,it is here :<b=
r></p></div><div><a href=3D"https://forums.developer.nvidia.com/t/rminitada=
pter-failed-error-produced-when-i-try-to-passthru-my-gtx-1060-to-a-linux-ub=
untu-bhyve-vm-instead-my-rtx-2080ti-is-passed-correctly/241594" target=3D"_=
blank">https://forums.developer.nvidia.com/t/rminitadapter-failed-error-pro=
duced-when-i-try-to-passthru-my-gtx-1060-to-a-linux-ubuntu-bhyve-vm-instead=
-my-rtx-2080ti-is-passed-correctly/241594</a></div></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Il giorno ven 3 feb 2023=
 alle ore 15:21 Mario Marietto &lt;<a href=3D"mailto:marietto2008@gmail.com=
" target=3D"_blank">marietto2008@gmail.com</a>&gt; ha scritto:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><span =
style=3D"font-family:arial,sans-serif"><span style=3D"color:rgb(0,0,0);back=
ground-color:rgb(255,255,255)">Very
 interesting behavior. I&#39;ve added this new line in /etc/rc.conf : (unti=
l
 some minutes ago I didn&#39;t use it because I was using the intel=20
driver,installed by the package : <span style=3D"font-family:monospace"><sp=
an style=3D"font-family:arial,sans-serif"><span style=3D"color:rgb(0,0,0);b=
ackground-color:rgb(255,255,255)">xf86-video-intel-2.99.917.916_2,1)</span>=
</span></span></span></span></div><div><span style=3D"font-family:arial,san=
s-serif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"=
><span style=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0);back=
ground-color:rgb(255,255,255)"><br></span></span></span></span></div><div><=
span style=3D"font-family:arial,sans-serif"><span style=3D"color:rgb(0,0,0)=
;background-color:rgb(255,255,255)"><span style=3D"color:rgb(0,0,0);backgro=
und-color:rgb(255,255,255)">kld_list=3D&quot;i915kms acpi_video&quot;</span=
><br></span></span></div><div><span style=3D"font-family:arial,sans-serif">=
<span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></sp=
an></span></div><div><span style=3D"font-family:arial,sans-serif"><span sty=
le=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">and this line in =
/boot/loader.conf :</span></span></div><div><span style=3D"font-family:aria=
l,sans-serif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,=
255)"><br></span></span></div><div><span style=3D"font-family:arial,sans-se=
rif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"><sp=
an style=3D"font-family:monospace"><span style=3D"font-family:arial,sans-se=
rif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">ppt=
devs=3D&quot;1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3 5/0/0&quot;</span></span><=
br></span></span></span></div><div><span style=3D"font-family:arial,sans-se=
rif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"><br=
></span></span></div><div><span style=3D"font-family:arial,sans-serif"><spa=
n style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">and boom. pp=
tdevs worked again:</span></span></div><div><span style=3D"font-family:aria=
l,sans-serif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,=
255)"><br></span></span></div><div><span style=3D"font-family:arial,sans-se=
rif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)"># p=
ciconf -l<br></span></span></div><div><span style=3D"font-family:arial,sans=
-serif"><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">=
<br></span></span></div><div><span style=3D"font-family:arial,sans-serif"><=
span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">ppt0@pci0=
:1:0:0: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x030000 rev=3D0x=
a1 hdr=3D0x00 vendor=3D0x10de device=3D0x1c02 subvendor=3D0x19da subdevice=
=3D0x2438
</span></span></div><span style=3D"font-family:monospace"><span style=3D"fo=
nt-family:arial,sans-serif">ppt1@pci0:1:0:1: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0class=3D0x040300 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=
=3D0x10f1 subvendor=3D0x19da subdevice=3D0x2438
<br>ppt2@pci0:2:0:0: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x03=
0000 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x1e04 subvendor=3D0x19=
da subdevice=3D0x2503
<br>ppt3@pci0:2:0:1: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x04=
0300 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x10f7 subvendor=3D0x19=
da subdevice=3D0x2503
<br>ppt4@pci0:2:0:2: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x0c=
0330 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x1ad6 subvendor=3D0x19=
da subdevice=3D0x2503
<br>ppt5@pci0:2:0:3: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x0c=
8000 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x1ad7 subvendor=3D0x19=
da subdevice=3D0x2503</span><br></span><div><span style=3D"font-family:mono=
space"><span style=3D"font-family:arial,sans-serif"><span style=3D"color:rg=
b(0,0,0);background-color:rgb(255,255,255)">ppt6@pci0:5:0:0: =C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D0x0c0330 rev=3D0x10 hdr=3D0x00 vendor=
=3D0x1b73 device=3D0x1100 subvendor=3D0x1b73 subdevice=3D0x1100</span></spa=
n><br></span></div><div><span style=3D"font-family:monospace"><br></span></=
div><div>So,maybe
 there is some incompatibility between the intel and the pptdevs driver ?
 take also in consideration that on xorg.cong I&#39;m still using the intel=
=20
driver :<br></div><div><br></div><div><span style=3D"font-family:monospace"=
><span style=3D"font-family:arial,sans-serif"><span style=3D"color:rgb(0,0,=
0);background-color:rgb(255,255,255)">Section &quot;Device&quot;
</span><br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Identifier =C2=A0&quo=
t;Card0&quot;
<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Driver =C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0&quot;intel&quot;
<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0BusID =C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0&quot;PCI:0:2:0&quot;
<br>EndSection. <br></span></span></div><div><span style=3D"font-family:mon=
ospace"><span style=3D"font-family:arial,sans-serif"><br></span></span></di=
v><div><span style=3D"font-family:monospace"><span style=3D"font-family:ari=
al,sans-serif">It&#39;s a confusing situation.</span> </span></div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Il giorn=
o ven 3 feb 2023 alle ore 14:13 Mario Marietto &lt;<a href=3D"mailto:mariet=
to2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>&gt; ha scrit=
to:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"=
ltr"><div><span>I&#39;ve sent an email to the hackers ML with this content =
:</span></div><div><span><br></span></div><div><span>&gt; On 30 Jan 2023, a=
t 05:37, Mario Marietto &lt;<a href=3D"mailto:marietto2008@gmail.com" targe=
t=3D"_blank">marietto2008@gmail.com</a>&gt; wrote:</span></div><div><span><=
/span></div><span>
&gt; In some FreeBSD 13.1 machines I have the problem below,in some=20
others I don&#39;t have it. I would like to know what the causes could be=
=20
and how to fix it. <br>
&gt; <br>
&gt; root@marietto:/usr/home/marietto # devctl detach pci0:1:0:0 <br>
&gt; <br>
&gt; devctl: Failed to detach pci0:1:0:0: Device busy<br>
&gt; <br>
&gt; root@marietto:/usr/home/marietto # devctl detach pci0:2:0:0 <br>
&gt; <br>
&gt; devctl: Failed to detach pci0:2:0:0: Device busy <br>
&gt; <br>
&gt; Not even it works if instead of detach them, I try to attach them dire=
ctly to the ppt driver :<br>
&gt; <br>
&gt; root@marietto:/usr/home/marietto/bhyve/Files # devctl set driver pci0:=
2:0:0 ppt <br>
&gt; devctl: Failed to set pci0:2:0:0 driver to ppt: Device busy<br>
&gt;=C2=A0 <br>
&gt; root@marietto:/usr/home/marietto/bhyve/Files # devctl detach pci0:2:0:=
0 <br>
&gt; devctl: Failed to detach pci0:2:0:0: Device busy<br>
&gt; <br>
&gt; Pci addresses 1:0:0 and 2:0:0 belong to the two GPUs that I have on my=
 PC :<br>
&gt; <br>
&gt; vgapci0@pci0:1:0:0:=C2=A0 =C2=A0 =C2=A0class=3D0x030000 rev=3D0xa1 hdr=
=3D0x00 vendor=3D0x10de device=3D0x1c02 subvendor=3D0x19da subdevice=3D0x24=
38 <br>
&gt; vgapci1@pci0:2:0:0:=C2=A0 =C2=A0 =C2=A0class=3D0x030000 rev=3D0xa1 hdr=
=3D0x00 vendor=3D0x10de device=3D0x1e04 subvendor=3D0x19da subdevice=3D0x25=
03<br>
&gt; <br>
&gt; Actually I have commented this line on /boot/loader.conf,because it
 makes no difference if I keep it uncommented or not. It is totally=20
ignored.<br>
&gt; <br>
&gt; #pptdevs=3D&quot;1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3&quot; <br></span>=
<div><br></div><div>and George replied to me like this :</div><div><br></di=
v>
Do you have &#39;vmm_load=3D&quot;YES&quot;&#39; in loader.conf?<br>
<br><div>
If not I am not sure it will have an effect - vmm must be loaded early=20
otherwise the card will be grabbed by the vgapci driver rather than be=20
put under ppt control.<span><br></span></div><div><span><br></span></div><d=
iv><span>I think this is an interesting answer. Yes,I keep vmm_load=3D&quot=
;YES&quot; in loader.conf,BUT putting the 4 slots under ppt control using t=
he loader.conf did not work for me for months. We haven&#39;t taken this in=
to consideration. And you didn&#39;t reply when I&#39;ve asked you if you h=
ave modified the bhyve source code,because putting the pci addresses under =
ppt using the loader.conf always worked for me. I would like to understand =
why it does not work anymore. This is important to understand why I&#39;m n=
ot able to attach / detach the nVidia driver from the host to the guest os.=
 And maybe George&#39;s consideration is relevant. <br></span></div><div><s=
pan></span></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
s=3D"gmail_attr">Il giorno ven 3 feb 2023 alle ore 12:11 Corvin K=C3=B6hne =
&lt;<a href=3D"mailto:C.Koehne@beckhoff.com" target=3D"_blank">C.Koehne@bec=
khoff.com</a>&gt; ha scritto:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex"><div>





<div lang=3D"EN-US">
<div id=3D"m_-3276811306036492484m_-3210909820163076187m_226117878510149543=
7m_-1035847088375675656m_144419679703708073OLX_DISCLAIMER_MARKER" style=3D"=
line-height:0px">
</div>
<div>
<div>
<div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">---&gt; Figure out if you can blacklist your =
gpu in the nvidia driver. So, the nVidia driver never gets attached to your=
 device.<u></u><u></u></li></ul>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">nope. I need to attach the nVidia driver to m=
y gpu if I want to run stable diffusion + pytorch + cuda on the Linuxulator=
 on FreeBSD. I&#39;m thinking of installing Stable Diffusion within
 the Linux VM,instead of doing it on FreeBSD.<u></u><u></u></li></ul>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">---&gt; Wait for drm drivers and use the nouv=
eau driver. Nouveau isn=E2=80=99t maintained by nVidia, so it=E2=80=99s mor=
e likely to get fixed.<u></u><u></u></li></ul>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">The nouveau driver is always bugged and it ne=
ver worked well. I wonder if it is still supported. It has even limited fea=
tures.<u></u><u></u></li></ul>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">Afaik, you don=E2=80=99t have other options, sry. I=
=E2=80=99m no gpu driver developer, so I can=E2=80=99t help you.<u></u><u><=
/u></p>
<p class=3D"MsoNormal">Btw: Do you refer to linux nouveau or freebsd nouvea=
u? Freebsd made much progress in porting linux drm to freebsd with 14.0. So=
, if latest linux nouveau fits your requirements, it=E2=80=99s likely that =
freebsd 14.0 may fit them too.<u></u><u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">Are the following commands enough to update t=
he bhyve source code on my machine ? take in consideration that I need to g=
rab only your new last patch.<u></u><u></u></li></ul>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">cd /usr/src<u></u><u></u></li></ul>
</div>
<div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in">git checkout -f origin/phab/corvink/13.1/nvid=
ia-wip<u></u><u></u></li></ul>
</div>
<ul style=3D"margin-top:0in" type=3D"disc">
<li style=3D"margin-left:0in"># cd /wherever/you/put/my/Makefile<u></u><u><=
/u></li></ul>
<p class=3D"MsoNormal" style=3D"margin-left:0.5in"># make -j 8<u></u><u></u=
></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">My latest patch is a mouse driver patch for the host=
. So, no, you have to use:<u></u><u></u></p>
<p class=3D"MsoNormal">cd /usr/src<u></u><u></u></p>
<p class=3D"MsoNormal">git fetch<u></u><u></u></p>
<p class=3D"MsoNormal">git checkout -f origin/phab/corvink/13.1/nvidia-wip<=
u></u><u></u></p>
<p class=3D"MsoNormal">make kernel<u></u><u></u></p>
<p class=3D"MsoNormal">reboot<u></u><u></u></p>
</div>
</div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">Best regards<u></u><u></u></p>
<p class=3D"MsoNormal">Corvin<u></u><u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<br>
<span style=3D"font-family:Arial,Helvetica,sans-serif;font-size:8pt">This e=
mail contains confidential information. If you have received it in error, y=
ou must not read, use, copy or pass on this e-mail or its attachments.<br>
If you have received the e-mail in error, please inform me immediately by r=
eply e-mail and then delete this e-mail from your system. Thank you<br>
<br>
Diese E-Mail enthaelt vertrauliche Informationen. Sollten Sie sie irrtuemli=
ch erhalten haben, duerfen Sie diese E-Mail oder ihre Anhaenge nicht lesen,=
 verwenden, kopieren oder weitergeben.<br>
Sollten Sie die Mail versehentlich erhalten haben, teilen Sie mir dies bitt=
e umgehend per Antwort-E-Mail mit und loeschen Sie diese E-Mail dann aus Ih=
rem System. Vielen Dank<br>
<br>
Beckhoff Automation GmbH &amp; Co. KG | Managing Director: Dipl. Phys. Hans=
 Beckhoff<br>
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075</spa=
n> <br>
<br>
</div>

</div></blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr">Mari=
o.<br></div>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr">Mario.<br>=
</div>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr">Mario.<br>=
</div>

--00000000000066e96a05f3cec1de--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSiijaRF%2BAwP8=9Ob%2BtS2pkakxnZ81h9zV-DwUwAJB=p%2BrQ>