From: "Huang, Ray" <Ray.Huang-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"Deucher,
Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Cc: "Tuikov, Luben" <Luben.Tuikov-5C7GfCeVMHo@public.gmane.org>,
"Huang, Ray" <Ray.Huang-5C7GfCeVMHo@public.gmane.org>,
"Koenig,
Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
"Liu, Aaron" <Aaron.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH v2 00/11] drm/amdgpu: introduce secure buffer object support (trusted memory zone)
Date: Wed, 25 Sep 2019 13:45:08 +0000 [thread overview]
Message-ID: <1569419090-5304-1-git-send-email-ray.huang@amd.com> (raw)
Hi all,
These series of patches introduce a feature to support secure buffer object.
The Trusted Memory Zone (TMZ) is a method to protect the contents being written
to and read from memory. We use TMZ hardware memory protection scheme to
implement the secure buffer object support.
TMZ is the page-level protection that hardware will detect the TMZ bit in the
page table entry to set the current page is encrypted. With this hardware
feature, we design a BO-level protection in kernel driver to provide a new flag
AMDGPU_GEM_CREATE_ENCRYPTED to gem create ioctl to libdrm for the secure buffer
allocation. And also provide the new AMDGPU_CS_FLAGS_SECURE to indicate the
command submmission is trusted or not. If the BO is secure, then the data is
encrypted, only the trusted IP blocks such as gfx, sdma, vcn are able to
decrypt. CPU as the un-trusted IP are unable to read the secure buffer.
We will submit the new secure command later for libdrm, and create a new test
suite to verify the security feature in the libdrm unit tests.
Suite id = 11: Name 'Security Tests status: ENABLED'
Test id 1: Name: 'allocate secure buffer test status: ENABLED'
Test id 2: Name: 'graphics secure command submission status: ENABLED'
Changes from V1 -> V2:
- Change the UAPI from secure context to secure command submission for display
server and client usage. (Thanks Luben)
- Remove ttm_mem_reg macro to get ttm_bo object.
- Move the amdgpu_bo_encrypted into amdgpu_vm_bo_update().
Thanks,
Ray
Alex Deucher (3):
drm/amdgpu: add UAPI for creating encrypted buffers
drm/amdgpu: define the TMZ bit for the PTE
drm/amdgpu: set TMZ bits in PTEs for secure BO (v4)
Huang Rui (7):
drm/amdgpu: add tmz feature parameter (v2)
drm/amdgpu: add amdgpu_tmz data structure
drm/amdgpu: add function to check tmz capability (v4)
drm/amdgpu: add tmz bit in frame control packet
drm/amdgpu: expand the emit tmz interface with trusted flag
drm/amdgpu: expand the context control interface with trust flag
drm/amdgpu: job is secure iff CS is secure (v3)
Luben Tuikov (1):
drm/amdgpu: add UAPI to create secure commands (v3)
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 ++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 ++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 12 +++++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 11 +++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 9 +++---
drivers/gpu/drm/amd/amdgpu/amdgpu_tmz.c | 49 ++++++++++++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_tmz.h | 39 ++++++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 20 +++++++++---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +-
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 3 +-
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 +++++++---
drivers/gpu/drm/amd/amdgpu/nvd.h | 1 +
drivers/gpu/drm/amd/amdgpu/soc15d.h | 1 +
include/uapi/drm/amdgpu_drm.h | 10 +++++-
22 files changed, 199 insertions(+), 23 deletions(-)
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_tmz.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_tmz.h
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next 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 Huang, Ray [this message]
2019-09-25 13:45 ` [PATCH v2 02/11] drm/amdgpu: add UAPI to create secure commands (v3) 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 08/11] drm/amdgpu: expand the emit tmz interface with trusted flag Huang, Ray
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-1-git-send-email-ray.huang@amd.com \
--to=ray.huang-5c7gfcevmho@public.gmane.org \
--cc=Aaron.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
--cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
--cc=Luben.Tuikov-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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