dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
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 04/11] drm/amdgpu: add tmz feature parameter (v2)
Date: Wed, 25 Sep 2019 13:45:21 +0000	[thread overview]
Message-ID: <1569419090-5304-5-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1569419090-5304-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>

This patch adds tmz parameter to enable/disable the feature in the amdgpu kernel
module. Nomally, by default, it should be auto (rely on the hardware
capability).

But right now, it need to set "off" to avoid breaking other developers'
work because it's not totally completed.

Will set "auto" till the feature is stable and completely verified.

v2: add "auto" option for future use.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h     |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index a1516a3..930643c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -172,6 +172,7 @@ extern int amdgpu_force_asic_type;
 #ifdef CONFIG_HSA_AMD
 extern int sched_policy;
 #endif
+extern int amdgpu_tmz;
 
 #ifdef CONFIG_DRM_AMDGPU_SI
 extern int amdgpu_si_support;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 6978d17..606f1d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -145,6 +145,7 @@ int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 int amdgpu_noretry = 1;
 int amdgpu_force_asic_type = -1;
+int amdgpu_tmz = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
 	.mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),
@@ -752,6 +753,16 @@ uint amdgpu_dm_abm_level = 0;
 MODULE_PARM_DESC(abmlevel, "ABM level (0 = off (default), 1-4 = backlight reduction level) ");
 module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
 
+/**
+ * DOC: tmz (int)
+ * Trust Memory Zone (TMZ) is a method to protect the contents being written to
+ * and read from memory.
+ *
+ * The default value: 0 (off).  TODO: change to auto till it is completed.
+ */
+MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
+module_param_named(tmz, amdgpu_tmz, int, 0444);
+
 static const struct pci_device_id pciidlist[] = {
 #ifdef  CONFIG_DRM_AMDGPU_SI
 	{0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI},
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent 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 ` [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   ` Huang, Ray [this message]
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-5-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;
as well as URLs for NNTP newsgroup(s).