dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Ray" <Ray.Huang@amd.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "Tuikov, Luben" <Luben.Tuikov@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Liu, Aaron" <Aaron.Liu@amd.com>
Subject: [PATCH v2 02/11] drm/amdgpu: add UAPI to create secure commands (v3)
Date: Wed, 25 Sep 2019 13:45:14 +0000	[thread overview]
Message-ID: <1569419090-5304-3-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1569419090-5304-1-git-send-email-ray.huang@amd.com>

From: Luben Tuikov <luben.tuikov@amd.com>

Add a flag to the command submission IOCTL
structure which when present indicates that this
command submission should be treated as
secure. The kernel driver uses this flag to
determine whether the engine should be
transitioned to secure or unsecure, or the work
can be submitted to a secure queue depending on
the IP.

v3: the flag is now at command submission IOCTL

Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
 include/uapi/drm/amdgpu_drm.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index f90b453..a101eea 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -207,6 +207,9 @@ union drm_amdgpu_bo_list {
 #define AMDGPU_CTX_OP_QUERY_STATE	3
 #define AMDGPU_CTX_OP_QUERY_STATE2	4
 
+/* Flag the command submission as secure */
+#define AMDGPU_CS_FLAGS_SECURE          (1 << 0)
+
 /* GPU reset status */
 #define AMDGPU_CTX_NO_RESET		0
 /* this the context caused it */
@@ -562,7 +565,7 @@ struct drm_amdgpu_cs_in {
 	/**  Handle of resource list associated with CS */
 	__u32		bo_list_handle;
 	__u32		num_chunks;
-	__u32		_pad;
+	__u32		flags;
 	/** this points to __u64 * which point to cs chunks */
 	__u64		chunks;
 };
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-09-25 13:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 13:45 [PATCH v2 00/11] drm/amdgpu: introduce secure buffer object support (trusted memory zone) Huang, Ray
2019-09-25 13:45 ` Huang, Ray [this message]
2019-09-25 13:45 ` [PATCH v2 08/11] drm/amdgpu: expand the emit tmz interface with trusted flag Huang, Ray
     [not found] ` <1569419090-5304-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2019-09-25 13:45   ` [PATCH v2 01/11] drm/amdgpu: add UAPI for creating encrypted buffers Huang, Ray
2019-09-25 13:45   ` [PATCH v2 03/11] drm/amdgpu: define the TMZ bit for the PTE Huang, Ray
2019-09-25 13:45   ` [PATCH v2 04/11] drm/amdgpu: add tmz feature parameter (v2) Huang, Ray
2019-09-25 13:45   ` [PATCH v2 05/11] drm/amdgpu: add amdgpu_tmz data structure Huang, Ray
2019-09-25 13:45   ` [PATCH v2 06/11] drm/amdgpu: add function to check tmz capability (v4) Huang, Ray
2019-09-25 13:45   ` [PATCH v2 07/11] drm/amdgpu: add tmz bit in frame control packet Huang, Ray
2019-09-25 13:45   ` [PATCH v2 09/11] drm/amdgpu: expand the context control interface with trust flag Huang, Ray
2019-09-25 13:45   ` [PATCH v2 10/11] drm/amdgpu: job is secure iff CS is secure (v3) Huang, Ray
     [not found]     ` <1569419090-5304-11-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2019-09-25 13:56       ` Koenig, Christian
2019-09-25 13:45 ` [PATCH v2 11/11] drm/amdgpu: set TMZ bits in PTEs for secure BO (v4) Huang, Ray
     [not found]   ` <1569419090-5304-12-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2019-09-25 13:59     ` Koenig, Christian
     [not found]       ` <507b6359-897a-20a1-2fff-28634858f464-5C7GfCeVMHo@public.gmane.org>
2019-09-25 16:01         ` Alex Deucher
2019-09-26  7:21           ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569419090-5304-3-git-send-email-ray.huang@amd.com \
    --to=ray.huang@amd.com \
    --cc=Aaron.Liu@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Luben.Tuikov@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox