From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B4FF73B71AC; Thu, 13 Aug 2026 21:31:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786656682; cv=none; b=u1K3OFPZ4xSgp7Rb5iesnWS93mn6MmCVTBXAy2uj7UG2uvn7iCdfnmqSSbetVlPWXUAntTbE5fiiOu8tKOg4jHwDONM/zn24bh8/s76cIrY0UXXqbdewQ8KHndI5bVY953yoIWM64zDXSOQxuTxX/7MuA09hC52h0r5sS+zxqMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786656682; c=relaxed/simple; bh=+n6PnZDAHr2Fn9RJz1oXrtJDxqN31ciPP1VU50Po3Fs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=JPXBzksGn6WXGSTN3n5bthwmn0Lc4jRfIO1DSmFUJZ2oW4pjscIY3Hk+EDD6x40m2/cCO5yZ6+3upsEOwBWxFcqjje07A7qvSn3xyuZBjsS0nzdZXJNyLbrvWQQxdCIsvwQkauToPd8SYg08qxmAYcHRxQ//K/+NJJKzAzoyEO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BxDO9/bw; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BxDO9/bw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4B151F000E9; Thu, 13 Aug 2026 21:31:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786656678; bh=bUhaiWgQYJu/0QDZBGUBxAU0zaMS1O8lN+hvtRT1FdE=; h=Date:Subject:Cc:To:From:References:In-Reply-To; b=BxDO9/bwRxYP2h6ngTwvaUme/Jw/91ReJya46kK13woKSAmBtJsi0w26sbOA0ALFS gwoXpSIc8KBJuFEU58eDAK5/o3NcSnx24mOtWITpGTWaXQ+KPDHcewyjkKOV3zT6tg oa0VMBpipOQoiXS+T9pYN0WO4q9PsBPBjF25S4Cpv3dpJPhOAYCPdmF6jusg2TLcNB brTIXQ+Zr8qcq1KJo8VzdWh5fMOxHMJnbyQGtzUIZHWPMIek6hfZfTD7XyhHTqFdjS n/6RwmM+RlwyOdYNlWcwFDmNAd/JHC8XUbK5FlEtOF2SNvLcfRiVaef2kTLNMMFRnE U+c4PzOfqbBng== Precedence: bulk X-Mailing-List: linux-kernel@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, 13 Aug 2026 23:31:12 +0200 Message-Id: Subject: Re: [PATCH 04/17] gpu: nova-core: allocate PCI MSI vector during probe Cc: "Joel Fernandes" , "Alexandre Courbot" , "Timur Tabi" , "Alistair Popple" , "Eliot Courtney" , "Shashank Sharma" , "Zhi Wang" , "David Airlie" , "Simona Vetter" , "Bjorn Helgaas" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , , "LKML" , "Joel Fernandes" , "Will Pierce" To: "John Hubbard" From: "Danilo Krummrich" References: <20260808031120.363869-1-jhubbard@nvidia.com> <20260808031120.363869-5-jhubbard@nvidia.com> In-Reply-To: <20260808031120.363869-5-jhubbard@nvidia.com> On Sat Aug 8, 2026 at 5:11 AM CEST, John Hubbard wrote: > Allocate a single PCI MSI interrupt vector in the probe path. > > Try MSI/MSI-X first. If that fails (possible in broken VFIO setups), > fall back to INTx with a dev_warn so the issue is visible in dmesg. > The allocation is devres-managed and automatically freed on unbind. [...] > +pub(crate) fn alloc_vector(pdev: &pci::Device) -> Result> { > + let msi_types =3D IrqTypes::default().with(IrqType::Msi).with(IrqTyp= e::MsiX); I was about to ask if we really need to bother with MSI and shouln't just g= o for MSI-X only. But then saw that the commit message mentions broken VFIO setups; can you e= xpand on this a bit? Which setups is the commit message referring to? > + > + let irq_vectors =3D match pdev.alloc_irq_vectors(1, 1, msi_types) { > + Ok(vecs) =3D> vecs, > + Err(_) =3D> { > + dev_warn!(pdev.as_ref(), "MSI not available, falling back to= INTx\n"); > + pdev.alloc_irq_vectors(1, 1, IrqTypes::default().with(IrqTyp= e::Intx))? > + } > + }; > + > + irq_vectors.vector(0) > +}