[v2,01/11] drm/amdgpu: add UAPI for creating encrypted buffers

Submitted by Huang, Ray on Sept. 25, 2019, 1:45 p.m.

Details

Message ID 1569419090-5304-2-git-send-email-ray.huang@amd.com
State New
Headers show
Series "drm/amdgpu: introduce secure buffer object support (trusted memory zone)" ( rev: 2 ) in DRI devel

Not browsing as part of any series.

Commit Message

Huang, Ray Sept. 25, 2019, 1:45 p.m.
From: Alex Deucher <alexander.deucher@amd.com>


Add a flag to the GEM_CREATE ioctl to create encrypted buffers.
Buffers with this flag set will be created with the TMZ bit set
in the PTEs or engines accessing them.  This is required in order
to properly access the data from the engines.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

---
 include/uapi/drm/amdgpu_drm.h | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.7.4

Patch hide | download patch | download mbox

diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index f3ad429..f90b453 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -135,6 +135,11 @@  extern "C" {
  * releasing the memory
  */
 #define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE	(1 << 9)
+/* Flag that BO will be encrypted and that the TMZ bit should be
+ * set in the PTEs when mapping this buffer via GPUVM or
+ * accessing it with various hw blocks
+ */
+#define AMDGPU_GEM_CREATE_ENCRYPTED		(1 << 10)
 
 struct drm_amdgpu_gem_create_in  {
 	/** the requested memory size */