gpu: nvgpu: add ctrl device instance ID

In order to share the TSG across different devices securely, device
instance IDs are to be exchanged for endpoint identification. Add
device instance ID field to gk20a_ctrl_priv which is generated
from gk20a level device instance id value.

Share this ID to userspace via gpu characteristics.

Bug 3677982
JIRA NVGPU-8681

Change-Id: I79d92a81c02272c52e24f5b12c452c8993137037
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2792079
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Scott Long <scottl@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Sagar Kamble
2022-09-26 17:46:58 +05:30
committed by mobile promotions
parent 41c874a2d9
commit 6e2b592ab9
8 changed files with 60 additions and 3 deletions

View File

@@ -343,6 +343,12 @@ struct nvgpu_gpu_characteristics {
__u32 max_dbg_tsg_timeslice;
__u32 reserved5;
/*
* Instance id of the opened ctrl node. Unique number over the
* nvgpu driver's lifetime (probe to unload).
*/
__u64 device_instance_id;
/* Notes:
- This struct can be safely appended with new fields. However, always
keep the structure size multiple of 8 and make sure that the binary