Zhi Wang
2024-Sep-22 12:49 UTC
[RFC 06/29] nvkm/vgpu: set RMSetSriovMode when NVIDIA vGPU is enabled
The registry object "RMSetSriovMode" is required to be set when vGPU is enabled. Set "RMSetSriovMode" to 1 when nvkm is loading the GSP firmware and initialize the GSP registry objects, if vGPU is enabled. Cc: Neo Jia <cjia at nvidia.com> Cc: Surath Mitra <smitra at nvidia.com> Signed-off-by: Zhi Wang <zhiw at nvidia.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index 49552d7df88f..a7db2a7880dd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c @@ -1500,6 +1500,9 @@ r535_gsp_rpc_set_registry(struct nvkm_gsp *gsp) kfree(p); } + if (nvkm_vgpu_mgr_is_supported(gsp->subdev.device)) + add_registry_num(gsp, "RMSetSriovMode", 1); + rpc = nvkm_gsp_rpc_get(gsp, NV_VGPU_MSG_FUNCTION_SET_REGISTRY, gsp->registry_rpc_size); if (IS_ERR(rpc)) { ret = PTR_ERR(rpc); -- 2.34.1
Jason Gunthorpe
2024-Sep-26 22:53 UTC
[RFC 06/29] nvkm/vgpu: set RMSetSriovMode when NVIDIA vGPU is enabled
On Sun, Sep 22, 2024 at 05:49:28AM -0700, Zhi Wang wrote:> The registry object "RMSetSriovMode" is required to be set when vGPU is > enabled. > > Set "RMSetSriovMode" to 1 when nvkm is loading the GSP firmware and > initialize the GSP registry objects, if vGPU is enabled.Also really weird, this sounds like what the PCI sriov enable is for. Jason