From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1652B211472; Thu, 2 Oct 2025 12:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759406914; cv=none; b=p+xx/YSuCCmTlyXe8nWTfa8A788uNNlM6StKkywuvFkYU1S2JnbxdZjjDfSmTwJ+sSqXNykK4zGa6hiKsyzaFlsUc0BdbLS1gsXEJomWgRzS7hWc7dxrNyJEM0SCjQ+FZkkBO/49iMM784P0t5kzNFiZf+mudBE8YITxKx5kLMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759406914; c=relaxed/simple; bh=tb+QlM/Ac5Zz+ol4V4q9n2Sx0VeZEGrctLpsPyzSZ/k=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=Qi+J0dP6/lEWeEQ+2beV66X1fq1IqFeUfxrGNbZzidjpOV8uBVODVPZ7ZkyN8QcWYsyHw1klfuMXQRRaQ2h8mICSsiEY/XPcegb3ryH6XxhcKwmQSvyv8NM7WmCVpGeSFIN0hjyF8qNRGEh9D5ZxCUcDtiFrk5NYTGSAQSSJgx4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ov2s+3Ra; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ov2s+3Ra" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A725C4CEF4; Thu, 2 Oct 2025 12:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759406913; bh=tb+QlM/Ac5Zz+ol4V4q9n2Sx0VeZEGrctLpsPyzSZ/k=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=Ov2s+3RamDIsz558ZwAxKFI3wxtJ6RcDcvlPFYTiGQ9OOT7N5Wwed8fMa9Cs4mKIg vdxvGbGnfFaaj1e0SqgftZikY1SH02xYLw5hG0Gb9siGYXDif56X0aoAUfWkKz02Z7 VTX2wo8znoNbJKCxfwrP24wiSk341/53Ged48CEbYFnKgH9s5t1LULBiMKF2fu6C31 07cqIRRu+z21E/iFXFxjTMRNNBGSA65XB6whdQf7x4Yts4HkxLIHDVhy8HmaZv7x/B 5XvOsA76/buhEn3u0OkqePQt7yiE+6y71o0y9IBJHmUMd/HNcF7bHbJ+U5xmoDGLIp SDyeKIaiS0YFw== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 02 Oct 2025 14:08:27 +0200 Message-Id: Subject: Re: [PATCH 0/2] rust: pci: expose is_virtfn() and reject VFs in nova-core Cc: "John Hubbard" , "Zhi Wang" , "Alistair Popple" , "Alexandre Courbot" , "Joel Fernandes" , "Timur Tabi" , "Surath Mitra" , "David Airlie" , "Simona Vetter" , "Bjorn Helgaas" , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "nouveau@lists.freedesktop.org" , "linux-pci@vger.kernel.org" , "rust-for-linux@vger.kernel.org" , "LKML" , "Alex Williamson" To: "Jason Gunthorpe" From: "Danilo Krummrich" References: <20250930220759.288528-1-jhubbard@nvidia.com> <20251002120149.GC3195801@nvidia.com> In-Reply-To: <20251002120149.GC3195801@nvidia.com> On Thu Oct 2, 2025 at 2:01 PM CEST, Jason Gunthorpe wrote: > On Thu, Oct 02, 2025 at 12:52:10AM +0200, Danilo Krummrich wrote: > >> Indicating whether the driver supports VFs through a boolean in struct >> pci_driver is about the same effort (well, maybe slightly more), but sol= ves the >> problem in a cleaner way since it avoids probe() being called in the fir= st >> place. Other existing drivers benefit from that as well. > > I'm strongly against that idea. > > Drivers should not be doing things like this, giving them core code > helpers to do something they should not do is the wrong direction. > > I think this patchset should be simply dropped. Novacore should try to > boot on a VF and fail if it isn't setup. Why? What about other upstream drivers that clearly assert that they don't support VFs? Why would we want to force them to try to boot to a point wher= e they "naturally" fail? I think there's nothing wrong with allowing drivers to "officially" assert = that they're intended for PFs only. Here are a few examples of drivers that have the same requirement: https://elixir.bootlin.com/linux/v6.17/source/drivers/net/ethernet/realtek/= rtase/rtase_main.c#L2195 https://elixir.bootlin.com/linux/v6.17/source/drivers/net/ethernet/intel/ic= e/ice_main.c#L5266 https://elixir.bootlin.com/linux/v6.17/source/drivers/net/ethernet/intel/ig= b/igb_main.c#L3221