From nobody Wed Feb 1 06:23:29 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 4P6BhT53Z1z3cHQK for ; Wed, 1 Feb 2023 06:24:09 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6BhR38BXz4kq8 for ; Wed, 1 Feb 2023 06:24:06 +0000 (UTC) (envelope-from darius@dons.net.au) Authentication-Results: mx1.freebsd.org; dkim=fail ("headers rsa verify failed") header.d=dons.net.au header.s=default header.b=JnUekN8G; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au; dmarc=pass (policy=quarantine) header.from=dons.net.au Received: from smtpclient.apple ([IPv6:2001:44b8:1d2:8900:dc56:cd7b:feba:3c2b]) (authenticated bits=0) by midget.dons.net.au (8.17.1/8.15.2) with ESMTPSA id 3116NjL6036853 (version=TLSv1.2 cipher=ECDHE-ECDSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2023 16:53:51 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1675232631; bh=fSIjpz9CpV1AAcZNAbOiWCpZilGviztX/Gx+OUPNx6c=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=JnUekN8GJpT4ta5NfHV4hgVFB1X4YQnTsFX3cm8xMUv75YOIuibw46syWOAvFTU15 xfVilz0LKK+NRxNZmMR1joyEncEAI3OlVeynajAS/2IJtw1CRiPJ5J1tTt2NCsulEe CkLjmNeVgqj41NH3pfKOpCj/T4aYK+Jm9hgqf03E= X-Authentication-Warning: midget.dons.net.au: Host [IPv6:2001:44b8:1d2:8900:dc56:cd7b:feba:3c2b] claimed to be smtpclient.apple Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) 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 From: "Daniel O'Connor" In-Reply-To: Date: Wed, 1 Feb 2023 16:53:29 +1030 Cc: freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <09A3D05B-E269-437F-8ACB-A150EBCACF4E@dons.net.au> References: To: Mario Marietto X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Status: No, score=0.40 X-Rspamd-Server: midget.dons.net.au X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; DMARC_POLICY_ALLOW(0.00)[dons.net.au,quarantine]; ASN(0.00)[asn:4764, ipnet:2403:5800::/32, country:AU]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:-]; FROM_HAS_DN(0.00)[]; R_DKIM_REJECT(0.00)[dons.net.au:s=default]; HAS_XAW(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4P6BhR38BXz4kq8 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N > On 30 Jan 2023, at 05:37, Mario Marietto = 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.=20 >=20 > root@marietto:/usr/home/marietto # devctl detach pci0:1:0:0=20 >=20 > devctl: Failed to detach pci0:1:0:0: Device busy >=20 > root@marietto:/usr/home/marietto # devctl detach pci0:2:0:0=20 >=20 > devctl: Failed to detach pci0:2:0:0: Device busy=20 >=20 > Not even it works if instead of detach them, I try to attach them = directly to the ppt driver : >=20 > root@marietto:/usr/home/marietto/bhyve/Files # devctl set driver = pci0:2:0:0 ppt=20 > devctl: Failed to set pci0:2:0:0 driver to ppt: Device busy > =20 > root@marietto:/usr/home/marietto/bhyve/Files # devctl detach = pci0:2:0:0=20 > devctl: Failed to detach pci0:2:0:0: Device busy >=20 > Pci addresses 1:0:0 and 2:0:0 belong to the two GPUs that I have on my = PC : >=20 > vgapci0@pci0:1:0:0: class=3D0x030000 rev=3D0xa1 hdr=3D0x00 = vendor=3D0x10de device=3D0x1c02 subvendor=3D0x19da subdevice=3D0x2438=20 > vgapci1@pci0:2:0:0: class=3D0x030000 rev=3D0xa1 hdr=3D0x00 = vendor=3D0x10de device=3D0x1e04 subvendor=3D0x19da subdevice=3D0x2503 >=20 > 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 = ignored. >=20 > #pptdevs=3D"1/0/0 1/0/1 2/0/0 2/0/1 2/0/2 2/0/3"=20 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 = put under ppt control. > In every FreeBSD machine I load the nvidia kernel modules adding the = line below to /etc/rc.conf : >=20 > kld_list=3D"nvidia nvidia-modeset" >=20 > and I have installed the nvidia-driver package on every machine. But = as I said,in some of them I see the error above,in some others I don't = see it. I'm not able to isolate the dysfunctional pattern. The xorg.conf = file is the same for each machine. Can someone help me to troubleshoot = the error ? thanks.=20 If you want to pass through the video card (as evidenced by devctl and = pptdevs) then why have the nvidia driver installed? Perhaps explain what you are trying to achieve rather than asking for = help on how to sold what you think the problem is. PS I have trimmed the CCs as that seems impolite. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum