Re: devctl: Failed to detach pci0:1:0:0: Device busy / devctl: Failed to set pci0:1:0:0 driver to ppt: Device busy

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Fri, 03 Feb 2023 13:22:39 UTC
To put the pci addresses under ppt using the loader.conf always worked for
me. I would like to understand why it does not work anymore for some
months. Maybe some new feature and some obscure bug has been introduced
inside the bhyve source code. This is important to understand why I'm not
able to attach / detach the nVidia driver from the host to the guest os and
it lets me think that your consideration may be relevant in some way.

Il giorno ven 3 feb 2023 alle ore 14:17 Daniel O'Connor <darius@dons.net.au>
ha scritto:

>
>
> > On 3 Feb 2023, at 23:37, Mario Marietto <marietto2008@gmail.com> wrote:
> > ---> If you want to pass through the video card (as evidenced by devctl
> and pptdevs) then why have the nvidia driver installed?
> >
> > Why did you say this ? Are you aware of some bug that prevents a pci
> device from being passed if its driver is installed ?
>
> No, it just seems pointless to have a driver for a card that it will never
> attach to because it is 'stolen' by the passthrough driver.
>
> > Maybe there is. Infact I made some progress. I have commented this line
> on /etc/rc.conf :
> >
> > #kld_list="nvidia nvidia-modeset"
> >
> > and I've been able to detach and reattach the 4 slots of the 2080 ti. I
> think that if I load the nvidia modules on the rc.conf,they interfere with
> a later attaching / detaching of 1 or 2 slots of the gpu (hdac and vgapci).
> Do you think that it could be caused by a bug on the nvidia driver or in
> the bhyve source code ? What do you suggest I do ?
>
> It seems very odd that loading the nvidia driver via rc.conf would 'beat'
> the passthrough driver loaded earlier in loader.conf.
>
> However I've never tried any pass through stuff so no idea sorry.
>
> --
> Daniel O'Connor
> "The nice thing about standards is that there
> are so many of them to choose from."
> -- Andrew Tanenbaum
>
>

-- 
Mario.