From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Cc: "Srinivasan Shanmugam" <srinivasan.shanmugam@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 15/17] drm/amdgpu/gfx9: Apply Isolation Enforcement to GFX & Compute rings
Date: Thu, 22 Aug 2024 08:35:04 +0200 [thread overview]
Message-ID: <d6664bb5-7b32-48cc-b7e3-dba7bfade792@gmail.com> (raw)
In-Reply-To: <20240815000501.1845226-16-alexander.deucher@amd.com>
Am 15.08.24 um 02:04 schrieb Alex Deucher:
> From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
>
> This commit applies isolation enforcement to the GFX and Compute rings
> in the gfx_v9_0 module.
>
> The commit sets `amdgpu_gfx_enforce_isolation_ring_begin_use` and
> `amdgpu_gfx_enforce_isolation_ring_end_use` as the functions to be
> called when a ring begins and ends its use, respectively.
>
> `amdgpu_gfx_enforce_isolation_ring_begin_use` is called when a ring
> begins its use. This function cancels any scheduled
> `enforce_isolation_work` and, if necessary, signals the Kernel Fusion
> Driver (KFD) to stop the runqueue.
>
> `amdgpu_gfx_enforce_isolation_ring_end_use` is called when a ring ends
> its use. This function schedules `enforce_isolation_work` to be run
> after a delay.
>
> These functions are part of the Enforce Isolation Handler, which
> enforces shader isolation on AMD GPUs to prevent data leakage between
> different processes.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Suggested-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 3045b8b0796d..21089aadbb7b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -7470,6 +7470,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = {
> .emit_mem_sync = gfx_v9_0_emit_mem_sync,
> .reset = gfx_v9_0_reset_kgq,
> .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader,
> + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use,
> + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use,
Does it make sense to have that for the MCBP ring as well?
Christian.
> };
>
> static const struct amdgpu_ring_funcs gfx_v9_0_sw_ring_funcs_gfx = {
> @@ -7528,6 +7530,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_sw_ring_funcs_gfx = {
> .patch_de = gfx_v9_0_ring_patch_de_meta,
> .patch_ce = gfx_v9_0_ring_patch_ce_meta,
> .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader,
> + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use,
> + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use,
> };
>
> static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
> @@ -7569,6 +7573,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
> .emit_wave_limit = gfx_v9_0_emit_wave_limit,
> .reset = gfx_v9_0_reset_kcq,
> .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader,
> + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use,
> + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use,
> };
>
> static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
next prev parent reply other threads:[~2024-08-22 6:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 0:04 [PATCH 00/17] Process Isolation Support Alex Deucher
2024-08-15 0:04 ` [PATCH 01/17] drm/amdgpu: handle enforce isolation on non-0 gfxhub Alex Deucher
2024-08-15 3:00 ` SRINIVASAN SHANMUGAM
2024-08-15 0:04 ` [PATCH 02/17] drm/amdgpu: Add infrastructure for Cleaner Shader feature Alex Deucher
2024-08-22 6:24 ` Christian König
2024-08-15 0:04 ` [PATCH 03/17] drm/amdgpu: Emit cleaner shader at end of IB submission Alex Deucher
2024-08-15 0:04 ` [PATCH 04/17] drm/amdgpu: Make enforce_isolation setting per GPU Alex Deucher
2024-08-15 0:04 ` [PATCH 05/17] drm/amdgpu: Enforce isolation as part of the job Alex Deucher
2024-08-15 0:04 ` [PATCH 06/17] drm/amdgpu: Add enforce_isolation sysfs attribute Alex Deucher
2024-08-15 0:04 ` [PATCH 07/17] drm/amdgpu: Add sysfs interface for running cleaner shader Alex Deucher
2024-08-22 6:29 ` Christian König
2024-08-15 0:04 ` [PATCH 08/17] drm/amdgpu: Add PACKET3_RUN_CLEANER_SHADER for cleaner shader execution Alex Deucher
2024-08-15 0:04 ` [PATCH 09/17] drm/amdgpu/gfx9: Implement cleaner shader support for GFX9 hardware Alex Deucher
2024-08-15 0:04 ` [PATCH 10/17] drm/amdgpu/gfx9: Implement cleaner shader support for GFX9.4.3 hardware Alex Deucher
2024-08-15 0:04 ` [PATCH 11/17] drm/amdgpu/gfx9: Add cleaner shader for GFX9.4.3 Alex Deucher
2024-08-15 0:04 ` [PATCH 12/17] drm/amdgpu/gfx9: Add cleaner shader support for GFX9.4.4 hardware Alex Deucher
2024-08-15 0:04 ` [PATCH 13/17] drm/amdkfd: APIs to stop/start KFD scheduling Alex Deucher
2024-08-15 0:04 ` [PATCH 14/17] drm/amdgpu: Implement Enforce Isolation Handler for KGD/KFD serialization Alex Deucher
2024-08-15 0:04 ` [PATCH 15/17] drm/amdgpu/gfx9: Apply Isolation Enforcement to GFX & Compute rings Alex Deucher
2024-08-22 6:35 ` Christian König [this message]
2024-08-15 0:05 ` [PATCH 16/17] drm/amdgpu/gfx_v9_4_3: " Alex Deucher
2024-08-15 0:05 ` [PATCH 17/17] drm/amdkfd: Enable processes isolation on gfx9 Alex Deucher
2024-08-22 6:36 ` [PATCH 00/17] Process Isolation Support 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=d6664bb5-7b32-48cc-b7e3-dba7bfade792@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=srinivasan.shanmugam@amd.com \
/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