[PATCH i-g-t v2 3/3] lib/amdgpu: Add encrypted flag for secure user queues
Jesse.zhang@amd.com
jesse.zhang at amd.com
Wed Apr 9 07:56:53 UTC 2025
When creating secure user queues, set the
AMDGPU_GEM_CREATE_ENCRYPTED flag for the GTT allocation if the
queue context is marked as secure. This ensures proper memory
protection for secure command submissions through user queues.
Signed-off-by: Jesse.Zhang <Jesse.zhang at amd.com>
---
lib/amdgpu/amd_user_queue.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/amdgpu/amd_user_queue.c b/lib/amdgpu/amd_user_queue.c
index 361f5acc6..0cdd0c4f9 100644
--- a/lib/amdgpu/amd_user_queue.c
+++ b/lib/amdgpu/amd_user_queue.c
@@ -281,6 +281,8 @@ void amdgpu_user_queue_create(amdgpu_device_handle device_handle, struct amdgpu_
return;
}
+ if (ctxt->secure)
+ gtt_flags |= AMDGPU_GEM_CREATE_ENCRYPTED;
r = amdgpu_query_uq_fw_area_info(device_handle, AMD_IP_GFX, 0, &ctxt->info);
igt_assert_eq(r, 0);
--
2.25.1
More information about the igt-dev
mailing list