Re: [PATCH 8/9] gpu: nova-core: set RMSetSriovMode when NVIDIA vGPU is enabled
From: Alexandre Courbot
Date: Tue Jun 16 2026 - 23:13:53 EST
On Thu Jun 4, 2026 at 8:43 PM JST, Zhi Wang wrote:
> The registry object "RMSetSriovMode" is required to be set when vGPU is
> enabled.
>
> Convert SetRegistry to use KVec<RegistryEntry> for dynamic construction,
> allowing entries to be added conditionally at runtime.
>
> Set "RMSetSriovMode" to 1 when nova-core is loading the GSP firmware and
> initialize the GSP registry objects, if vGPU is enabled.
>
> Signed-off-by: Zhi Wang <zhiw@xxxxxxxxxx>
Can you split the conversion to `KVec` and the addition of
`RMSetSriovMode` into two separate patches? The conversion to `KVec`
will likely be useful on its own, and splitting also makes review easier
as the concerns are well-separated.
<...>
> @@ -299,6 +299,7 @@ pub(crate) enum MsgFunction {
> OsErrorLog = bindings::NV_VGPU_MSG_EVENT_OS_ERROR_LOG,
> PostEvent = bindings::NV_VGPU_MSG_EVENT_POST_EVENT,
> RcTriggered = bindings::NV_VGPU_MSG_EVENT_RC_TRIGGERED,
> + GpuacctPerfmonUtilSamples = bindings::NV_VGPU_MSG_EVENT_GPUACCT_PERFMON_UTIL_SAMPLES,
> UcodeLibOsPrint = bindings::NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT,
> }
>
> @@ -348,6 +349,9 @@ fn try_from(value: u32) -> Result<MsgFunction> {
> bindings::NV_VGPU_MSG_EVENT_OS_ERROR_LOG => Ok(MsgFunction::OsErrorLog),
> bindings::NV_VGPU_MSG_EVENT_POST_EVENT => Ok(MsgFunction::PostEvent),
> bindings::NV_VGPU_MSG_EVENT_RC_TRIGGERED => Ok(MsgFunction::RcTriggered),
> + bindings::NV_VGPU_MSG_EVENT_GPUACCT_PERFMON_UTIL_SAMPLES => {
> + Ok(MsgFunction::GpuacctPerfmonUtilSamples)
> + }
Why is this needed?