Re: [PATCH v5 03/35] gpu: nova-core: gsp: decouple boot context from VgpuManager
From: Eliot Courtney
Date: Tue Dec 01 2026 - 01:29:33 EST
On Tue Nov 24, 2026 at 10:58 PM JST, Alok Kumar wrote:
> From: Zhi Wang <zhiw@xxxxxxxxxx>
>
> GSP boot uses the detected vGPU mode to size firmware resources and
> populate GSP_INIT. Carrying the whole manager in the boot and unload
> context couples these operations to its runtime interface.
>
> The boot code only needs read access to the mode, and unloading does
> not use the manager. A short state borrow is sufficient for both
> context construction sites.
>
> Make GspBootContext borrow VgpuState directly and read it in the
> VRAM and GSP_INIT helpers. Return a state reference from the
> manager without changing mode detection or the values passed to firmware.
>
> No functional change is intended.
>
> Cc: Alexandre Courbot <acourbot@xxxxxxxxxx>
> Signed-off-by: Zhi Wang <zhiw@xxxxxxxxxx>
> Signed-off-by: Alok Kumar <alkumar@xxxxxxxxxx>
> ---
Suggest squashing patch 4 into this patch and storing VgpuState by value
instead of by reference in GspBootContext (it's Copy anyway).