From nobody Fri Feb 03 13:22:39 2023 X-Original-To: freebsd-hackers@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 4P7bv91HYXz2p76P for ; Fri, 3 Feb 2023 13:23:17 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7bv90jSHz425f for ; Fri, 3 Feb 2023 13:23:17 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id mc11so15229027ejb.10 for ; Fri, 03 Feb 2023 05:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0YfC6RwCZFg/jReBvibYHOmMdr2eSB3Tkh1XD9+4Qd4=; b=PuKF+lONek6dUyMqpxJ2gVwZQjA3G9K+qG/kJxvR7aVFSjNcXNoMl9b145ajNJB8bC 50Flq8U17HbIUJTCCuPJ88qhC4iKwsxwU/xvEZZM05CNFdkfdm5qZlHzbBlinqHxzaJM EMW5/rnTWOdNKfiRLC133X9eeYk5feKq/MWpd7EiuySb2NO3ZLPddxtDcpOR3VU7Hi6q 96tKvSLHK/Sc4vYZShtfz6Iu+5+8sP7H08s2A3TILn2OMdRfVLl3QkP8gzBD57rqwQXU PXf7Ea/whDG4s3EUhOqsR8g4m2AOxbEwmEUxIr6yAmCFir/pHNMB0QL78HPRsBEOKTqv 04Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0YfC6RwCZFg/jReBvibYHOmMdr2eSB3Tkh1XD9+4Qd4=; b=Psezh6bFN2O0GpatmW7+u2XrkI2Y5zOs0JSWIQtU/Ak05ZjQutTKpovRE/w+AAUtQ3 Bxfo6/1M6kW6aOOes2syQIphoTjauTUHSBaogavVDNwrpjUv/hvgCWmaK6T5GPX9IEKG J+Q6NJC/uwEnw7/QW7QcpeH5smMxaegYZfUFR+oKy1PKtmW2XRZXpXwuo0RajBwOURPC CRtfnL1cGZ/W6GF3Oqbq+683FVzodR9Am6wxEysJRN/XxMORuUP7KPhlsIKR8+BkIpx+ ItjFDtQ5ozMU33aEXzsUw4QNsqcmZOmPw+6d1aD3+A6THTAMPvo9HWsmACw9ej7utFzG 5n8Q== X-Gm-Message-State: AO0yUKXNJQ9gY1EJv0+kN9qB4njGFv3FooYRElApljhjh5rpTUTcpXBI ElFKYviCQLrDIUf9KymY9xLkcDVBzfh4ERNu968emXtRWhLF4Q== X-Google-Smtp-Source: AK7set+cXWO+S1LiUe6RUohIfQnKeSsRC9m+FoLTstoYLHxT6HVx/9VAIG+lBNGg4r8YsXhfOs4VW7hs/SvhI/4rPxU= X-Received: by 2002:a17:906:fc16:b0:84d:4d2d:1c5f with SMTP id ov22-20020a170906fc1600b0084d4d2d1c5fmr3009340ejb.114.1675430595830; Fri, 03 Feb 2023 05:23:15 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <09A3D05B-E269-437F-8ACB-A150EBCACF4E@dons.net.au> <128F6D81-D71B-4BC7-9143-8205E826088F@dons.net.au> <4E67D54E-CF0E-4A56-9B6B-51C359B7CEE2@dons.net.au> In-Reply-To: <4E67D54E-CF0E-4A56-9B6B-51C359B7CEE2@dons.net.au> From: Mario Marietto Date: Fri, 3 Feb 2023 14:22:39 +0100 Message-ID: Subject: Re: devctl: Failed to detach pci0:1:0:0: Device busy / devctl: Failed to set pci0:1:0:0 driver to ppt: Device busy To: "Daniel O'Connor" Cc: freebsd-hackers Content-Type: multipart/alternative; boundary="00000000000082a63305f3cb957a" X-Rspamd-Queue-Id: 4P7bv90jSHz425f X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000082a63305f3cb957a Content-Type: text/plain; charset="UTF-8" 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 ha scritto: > > > > On 3 Feb 2023, at 23:37, Mario Marietto 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. --00000000000082a63305f3cb957a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To put the pci addresses under ppt using the loader.= conf=20 always worked for me. I would like to understand why it does not work=20 anymore for some months. Maybe some new feature and some obscure bug has be= en introduced inside the bhyve source code. This is important to understand= why I'm not able to attach /=20 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 de= vctl and pptdevs) then why have the nvidia driver installed?
>
> Why did you say this ? Are you aware of some bug that prevents a pci d= evice 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 lin= e on /etc/rc.conf :
>
> #kld_list=3D"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 vg= apci). Do you think that it could be caused by a bug on the nvidia driver o= r in the bhyve source code ? What do you suggest I do ?

It seems very odd that loading the nvidia driver via rc.conf would 'bea= t' 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.
--00000000000082a63305f3cb957a--