Re: [PATCH v3 21/33] gpu: nova-core: gsp: add the GSP_INIT request builder
From: Alexandre Courbot
Date: Tue Sep 22 2026 - 21:53:20 EST
On Fri Sep 18, 2026 at 10:07 AM JST, John Hubbard wrote:
<...>
> + /// Creates the request for `dev`.
> + ///
> + /// The registry keys are [`REGISTRY_ENTRIES`], plus `RMSetSriovMode` when `vgpu_state` reports
> + /// that vGPU is enabled.
> + ///
> + /// # Errors
> + ///
> + /// - `ENOMEM` if the registry list cannot be allocated.
> + pub(crate) fn new(
> + dev: &pci::Device<device::Bound>,
> + chipset: Chipset,
> + vgpu_state: VgpuState,
> + ) -> Result<Self> {
> + let mut regkeys = KVVec::new();
> + for &(name, value) in REGISTRY_ENTRIES {
> + regkeys.push(RegKey::new(name, value), GFP_KERNEL)?;
> + }
> + if matches!(vgpu_state, VgpuState::Enabled { .. }) {
> + regkeys.push(RegKey::new(b"RMSetSriovMode\0", 1), GFP_KERNEL)?;
> + }
> +
> + let mirror = chipset.pci_config_mirror_range();
> + // `PCI_DEVID` packs the bus, device and function as the low half of a `Dbdf` does.
> + let dev_id = Dbdf::from(u32::from(dev.dev_id()));
This makes the build break: `Dbdf` is not created by this series or any
of its listed dependencies, and comes from Zhi's series [1], which
supposedly depends from this one - so we have a dependency cycle that
needs to be broken somehow.
[1] https://lore.kernel.org/all/20260914074907.1399629-21-zhiw@xxxxxxxxxx/