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: Daniel O'Connor <darius_at_dons.net.au>
Date: Fri, 03 Feb 2023 13:17:20 UTC

> 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