<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The way this is upstreamed is that you submit the kernel and userspace patches for review at the same time. When they see the userspace patches, the kernel patches will be accepted. When the kernel patches land in the Dave's or Linus's tree, the userspace patches
can be pushed.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Marek<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Olsak, Marek <Marek.Olsak@amd.com><br>
<b>Sent:</b> November 15, 2019 14:34<br>
<b>To:</b> Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Christian König <ckoenig.leichtzumerken@gmail.com>; Liu, Aaron <Aaron.Liu@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Huang, Ray <Ray.Huang@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>; Liu, Leo <Leo.Liu@amd.com><br>
<b>Subject:</b> Re: [PATCH 01/12] amdgpu: add UAPI for creating encrypted buffers</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In the kernel tree, you need to do "make headers_install". Then copy amdgpu_drm.h from ./usr/ to the libdrm tree and discard parts that we can't upstream (freesync).</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Marek<br>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Sent:</b> November 15, 2019 10:08<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Cc:</b> Christian König <ckoenig.leichtzumerken@gmail.com>; Liu, Aaron <Aaron.Liu@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Olsak, Marek <Marek.Olsak@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>;
Liu, Leo <Leo.Liu@amd.com><br>
<b>Subject:</b> Re: [PATCH 01/12] amdgpu: add UAPI for creating encrypted buffers</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div dir="auto">I know, that's the usual chicken and egg problem with updating libdrm.
<div dir="auto"><br>
</div>
<div dir="auto">But we should update the file with the kernel version and not pick all changes line by line.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Christian.</div>
</div>
<div class="x_x_gmail_extra"><br>
<div class="x_x_gmail_quote">Am 15.11.2019 15:49 schrieb "Deucher, Alexander" <Alexander.Deucher@amd.com>:<br type="attribution">
</div>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
We can't land the kernel side until we have real userspace (e.g., Mesa) that uses the TMZ interfaces. The unit tests are not enough.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Alex</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_x_appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Friday, November 15, 2019 7:56 AM<br>
<b>To:</b> Liu, Aaron <Aaron.Liu@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Olsak, Marek <Marek.Olsak@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Subject:</b> Re: [PATCH 01/12] amdgpu: add UAPI for creating encrypted buffers</font>
<div> </div>
</div>
<div class="x_x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_x_PlainText">Am 15.11.19 um 04:34 schrieb Aaron Liu:<br>
> From: Huang Rui <ray.huang@amd.com><br>
><br>
> To align the kernel uapi change from Alex:<br>
><br>
> "Add a flag to the GEM_CREATE ioctl to create encrypted buffers. Buffers with<br>
> this flag set will be created with the TMZ bit set in the PTEs or engines<br>
> accessing them. This is required in order to properly access the data from the<br>
> engines."<br>
><br>
> We will use GEM_CREATE_ENCRYPTED flag for secure buffer allocation.<br>
><br>
> Signed-off-by: Huang Rui <ray.huang@amd.com><br>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
<br>
Please read up on how amdpu_drm.h is updated. The change must first land <br>
upstream and then the file is synced up somehow semi-automatic.<br>
<br>
Christian.<br>
<br>
> ---<br>
> include/drm/amdgpu_drm.h | 5 +++++<br>
> 1 file changed, 5 insertions(+)<br>
><br>
> diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h<br>
> index 5c28aa7..1a95e37 100644<br>
> --- a/include/drm/amdgpu_drm.h<br>
> +++ b/include/drm/amdgpu_drm.h<br>
> @@ -141,6 +141,11 @@ extern "C" {<br>
> * releasing the memory<br>
> */<br>
> #define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9)<br>
> +/* Flag that BO will be encrypted and that the TMZ bit should be<br>
> + * set in the PTEs when mapping this buffer via GPUVM or<br>
> + * accessing it with various hw blocks<br>
> + */<br>
> +#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10)<br>
> <br>
> /* Hybrid specific */<br>
> /* Flag that the memory allocation should be from top of domain */<br>
<br>
</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>