[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DEYI8XGC8SM4.34XY9POC523A9@nvidia.com>
Date: Mon, 15 Dec 2025 13:28:06 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Timur Tabi" <ttabi@...dia.com>, "linux-pci@...r.kernel.org"
<linux-pci@...r.kernel.org>, "Zhi Wang" <zhiw@...dia.com>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>
Cc: "Kirti Wankhede" <kwankhede@...dia.com>, "a.hindborg@...nel.org"
<a.hindborg@...nel.org>, "markus.probst@...teo.de"
<markus.probst@...teo.de>, "boqun.feng@...il.com" <boqun.feng@...il.com>,
"Neo Jia" <cjia@...dia.com>, "ojeda@...nel.org" <ojeda@...nel.org>, "Aniket
Agashe" <aniketa@...dia.com>, "tmgross@...ch.edu" <tmgross@...ch.edu>,
"alex.gaynor@...il.com" <alex.gaynor@...il.com>, "helgaas@...nel.org"
<helgaas@...nel.org>, "lossin@...nel.org" <lossin@...nel.org>,
"alex@...zbot.org" <alex@...zbot.org>, "Surath Mitra" <smitra@...dia.com>,
"John Hubbard" <jhubbard@...dia.com>, "Ankit Agrawal" <ankita@...dia.com>,
"Alexandre Courbot" <acourbot@...dia.com>, "bjorn3_gh@...tonmail.com"
<bjorn3_gh@...tonmail.com>, "Tarun Gupta (SW-GPU)" <targupta@...dia.com>,
"zhiwang@...nel.org" <zhiwang@...nel.org>, "airlied@...il.com"
<airlied@...il.com>, "aliceryhl@...gle.com" <aliceryhl@...gle.com>,
"kwilczynski@...nel.org" <kwilczynski@...nel.org>, "bhelgaas@...gle.com"
<bhelgaas@...gle.com>, "gary@...yguo.net" <gary@...yguo.net>,
"dakr@...nel.org" <dakr@...nel.org>, "Joel Fernandes"
<joelagnelf@...dia.com>, "Nouveau" <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [RFC 5/7] gpu: nova-core: set RMSetSriovMode when NVIDIA vGPU
is enabled
On Mon Dec 8, 2025 at 12:55 AM JST, Timur Tabi wrote:
> On Sat, 2025-12-06 at 12:42 +0000, Zhi Wang wrote:
>> - pub(crate) fn new() -> Self {
>> + pub(crate) fn new(vgpu_support: bool) -> Self {
>> + let num_entries = if vgpu_support { 4 } else { 3 };
>
> Instead of passing a bool, and then hard-coding the length based on that bool (which would
> require that RMSetSriovMode always be the last entry in the array), you need to do what Nouveau
> does: if VGPU is enabled, then dynamically append the entry to the array.
Yup, as we will add more stuff to the registry depending on various
conditions it would be great to make it more flexible.
The way for this would be to make `SetRegistry` wrap a `KVec` of
`RegistryEntry` - that way we can add what we need according to the
runtime options.
The current design of `SetRegistry` (which does not directly wraps the
type to write to the command queue, but instead implements
`CommandToGsp` to create it as the command is sent) should make this
rather trivial.
Powered by blists - more mailing lists