* [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
@ 2025-01-24 6:34 Srinivasan Shanmugam
2025-01-24 15:25 ` Alex Deucher
2025-01-24 16:31 ` Marek Olšák
0 siblings, 2 replies; 7+ messages in thread
From: Srinivasan Shanmugam @ 2025-01-24 6:34 UTC (permalink / raw)
To: Christian König, Alex Deucher; +Cc: amd-gfx, Srinivasan Shanmugam
Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
isolation between GPU workloads. The cleaner shader is responsible for
clearing the Local Data Store (LDS), Vector General Purpose Registers
(VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
prevent data leakage and ensures accurate computation results.
This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
previously available for GFX10.1.10. It enhances security by clearing
GPU memory between processes and maintains a consistent GPU state across
KGD and KFD workloads.
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 1878c83ff7e3..938f7d60a0ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block *ip_block)
}
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
case IP_VERSION(10, 1, 10):
+ case IP_VERSION(10, 1, 1):
+ case IP_VERSION(10, 1, 2):
adev->gfx.cleaner_shader_ptr = gfx_10_1_10_cleaner_shader_hex;
adev->gfx.cleaner_shader_size = sizeof(gfx_10_1_10_cleaner_shader_hex);
if (adev->gfx.me_fw_version >= 101 &&
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 6:34 [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs Srinivasan Shanmugam
@ 2025-01-24 15:25 ` Alex Deucher
2025-01-24 16:31 ` Marek Olšák
1 sibling, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2025-01-24 15:25 UTC (permalink / raw)
To: Srinivasan Shanmugam; +Cc: Christian König, Alex Deucher, amd-gfx
On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam
<srinivasan.shanmugam@amd.com> wrote:
>
> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
> isolation between GPU workloads. The cleaner shader is responsible for
> clearing the Local Data Store (LDS), Vector General Purpose Registers
> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
> prevent data leakage and ensures accurate computation results.
>
> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
> previously available for GFX10.1.10. It enhances security by clearing
> GPU memory between processes and maintains a consistent GPU state across
> KGD and KFD workloads.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 1878c83ff7e3..938f7d60a0ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block *ip_block)
> }
> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> case IP_VERSION(10, 1, 10):
> + case IP_VERSION(10, 1, 1):
> + case IP_VERSION(10, 1, 2):
> adev->gfx.cleaner_shader_ptr = gfx_10_1_10_cleaner_shader_hex;
> adev->gfx.cleaner_shader_size = sizeof(gfx_10_1_10_cleaner_shader_hex);
> if (adev->gfx.me_fw_version >= 101 &&
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 6:34 [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs Srinivasan Shanmugam
2025-01-24 15:25 ` Alex Deucher
@ 2025-01-24 16:31 ` Marek Olšák
2025-01-24 17:30 ` SRINIVASAN SHANMUGAM
1 sibling, 1 reply; 7+ messages in thread
From: Marek Olšák @ 2025-01-24 16:31 UTC (permalink / raw)
To: Srinivasan Shanmugam; +Cc: Christian König, Alex Deucher, amd-gfx
[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]
Does this commit really enable it though? Or is it just for sysfs?
Marek
On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam <
srinivasan.shanmugam@amd.com> wrote:
> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
> isolation between GPU workloads. The cleaner shader is responsible for
> clearing the Local Data Store (LDS), Vector General Purpose Registers
> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
> prevent data leakage and ensures accurate computation results.
>
> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
> previously available for GFX10.1.10. It enhances security by clearing
> GPU memory between processes and maintains a consistent GPU state across
> KGD and KFD workloads.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 1878c83ff7e3..938f7d60a0ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block
> *ip_block)
> }
> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> case IP_VERSION(10, 1, 10):
> + case IP_VERSION(10, 1, 1):
> + case IP_VERSION(10, 1, 2):
> adev->gfx.cleaner_shader_ptr =
> gfx_10_1_10_cleaner_shader_hex;
> adev->gfx.cleaner_shader_size =
> sizeof(gfx_10_1_10_cleaner_shader_hex);
> if (adev->gfx.me_fw_version >= 101 &&
> --
> 2.34.1
>
>
[-- Attachment #2: Type: text/html, Size: 2496 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 16:31 ` Marek Olšák
@ 2025-01-24 17:30 ` SRINIVASAN SHANMUGAM
2025-01-24 17:39 ` Alex Deucher
0 siblings, 1 reply; 7+ messages in thread
From: SRINIVASAN SHANMUGAM @ 2025-01-24 17:30 UTC (permalink / raw)
To: Marek Olšák; +Cc: Christian König, Alex Deucher, amd-gfx
[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]
On 1/24/2025 10:01 PM, Marek Olšák wrote:
> Does this commit really enable it though? Or is it just for sysfs?
>
Yes it enables cleaner shader support not only sysfs.
Best regards,
Srini
> Marek
>
> On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam
> <srinivasan.shanmugam@amd.com> wrote:
>
> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
> isolation between GPU workloads. The cleaner shader is responsible for
> clearing the Local Data Store (LDS), Vector General Purpose Registers
> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
> prevent data leakage and ensures accurate computation results.
>
> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
> previously available for GFX10.1.10. It enhances security by clearing
> GPU memory between processes and maintains a consistent GPU state
> across
> KGD and KFD workloads.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 1878c83ff7e3..938f7d60a0ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct
> amdgpu_ip_block *ip_block)
> }
> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> case IP_VERSION(10, 1, 10):
> + case IP_VERSION(10, 1, 1):
> + case IP_VERSION(10, 1, 2):
> adev->gfx.cleaner_shader_ptr =
> gfx_10_1_10_cleaner_shader_hex;
> adev->gfx.cleaner_shader_size =
> sizeof(gfx_10_1_10_cleaner_shader_hex);
> if (adev->gfx.me_fw_version >= 101 &&
> --
> 2.34.1
>
[-- Attachment #2: Type: text/html, Size: 4110 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 17:30 ` SRINIVASAN SHANMUGAM
@ 2025-01-24 17:39 ` Alex Deucher
2025-01-24 21:33 ` Marek Olšák
0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2025-01-24 17:39 UTC (permalink / raw)
To: SRINIVASAN SHANMUGAM
Cc: Marek Olšák, Christian König, Alex Deucher,
amd-gfx
On Fri, Jan 24, 2025 at 12:38 PM SRINIVASAN SHANMUGAM
<srinivasan.shanmugam@amd.com> wrote:
>
>
> On 1/24/2025 10:01 PM, Marek Olšák wrote:
>
> Does this commit really enable it though? Or is it just for sysfs?
>
> Yes it enables cleaner shader support not only sysfs.
It enables the functionality in the kernel. It can be turned on or
manually run via sysfs.
Alex
>
> Best regards,
> Srini
>
> Marek
>
> On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> wrote:
>>
>> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
>> isolation between GPU workloads. The cleaner shader is responsible for
>> clearing the Local Data Store (LDS), Vector General Purpose Registers
>> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
>> prevent data leakage and ensures accurate computation results.
>>
>> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
>> previously available for GFX10.1.10. It enhances security by clearing
>> GPU memory between processes and maintains a consistent GPU state across
>> KGD and KFD workloads.
>>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> index 1878c83ff7e3..938f7d60a0ee 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block *ip_block)
>> }
>> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
>> case IP_VERSION(10, 1, 10):
>> + case IP_VERSION(10, 1, 1):
>> + case IP_VERSION(10, 1, 2):
>> adev->gfx.cleaner_shader_ptr = gfx_10_1_10_cleaner_shader_hex;
>> adev->gfx.cleaner_shader_size = sizeof(gfx_10_1_10_cleaner_shader_hex);
>> if (adev->gfx.me_fw_version >= 101 &&
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 17:39 ` Alex Deucher
@ 2025-01-24 21:33 ` Marek Olšák
2025-01-24 21:41 ` Alex Deucher
0 siblings, 1 reply; 7+ messages in thread
From: Marek Olšák @ 2025-01-24 21:33 UTC (permalink / raw)
To: Alex Deucher
Cc: SRINIVASAN SHANMUGAM, Christian König, Alex Deucher, amd-gfx
[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]
So it's implemented but not enabled by default, right?
Marek
On Fri, Jan 24, 2025 at 12:40 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> On Fri, Jan 24, 2025 at 12:38 PM SRINIVASAN SHANMUGAM
> <srinivasan.shanmugam@amd.com> wrote:
> >
> >
> > On 1/24/2025 10:01 PM, Marek Olšák wrote:
> >
> > Does this commit really enable it though? Or is it just for sysfs?
> >
> > Yes it enables cleaner shader support not only sysfs.
>
> It enables the functionality in the kernel. It can be turned on or
> manually run via sysfs.
>
> Alex
>
> >
> > Best regards,
> > Srini
> >
> > Marek
> >
> > On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam <
> srinivasan.shanmugam@amd.com> wrote:
> >>
> >> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
> >> isolation between GPU workloads. The cleaner shader is responsible for
> >> clearing the Local Data Store (LDS), Vector General Purpose Registers
> >> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
> >> prevent data leakage and ensures accurate computation results.
> >>
> >> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
> >> previously available for GFX10.1.10. It enhances security by clearing
> >> GPU memory between processes and maintains a consistent GPU state across
> >> KGD and KFD workloads.
> >>
> >> Cc: Christian König <christian.koenig@amd.com>
> >> Cc: Alex Deucher <alexander.deucher@amd.com>
> >> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> >> ---
> >> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> >> index 1878c83ff7e3..938f7d60a0ee 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> >> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct
> amdgpu_ip_block *ip_block)
> >> }
> >> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> >> case IP_VERSION(10, 1, 10):
> >> + case IP_VERSION(10, 1, 1):
> >> + case IP_VERSION(10, 1, 2):
> >> adev->gfx.cleaner_shader_ptr =
> gfx_10_1_10_cleaner_shader_hex;
> >> adev->gfx.cleaner_shader_size =
> sizeof(gfx_10_1_10_cleaner_shader_hex);
> >> if (adev->gfx.me_fw_version >= 101 &&
> >> --
> >> 2.34.1
> >>
>
[-- Attachment #2: Type: text/html, Size: 3589 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs
2025-01-24 21:33 ` Marek Olšák
@ 2025-01-24 21:41 ` Alex Deucher
0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2025-01-24 21:41 UTC (permalink / raw)
To: Marek Olšák
Cc: SRINIVASAN SHANMUGAM, Christian König, Alex Deucher, amd-gfx
On Fri, Jan 24, 2025 at 4:34 PM Marek Olšák <maraeo@gmail.com> wrote:
>
> So it's implemented but not enabled by default, right?
Yes.
Alex
>
> Marek
>
> On Fri, Jan 24, 2025 at 12:40 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> On Fri, Jan 24, 2025 at 12:38 PM SRINIVASAN SHANMUGAM
>> <srinivasan.shanmugam@amd.com> wrote:
>> >
>> >
>> > On 1/24/2025 10:01 PM, Marek Olšák wrote:
>> >
>> > Does this commit really enable it though? Or is it just for sysfs?
>> >
>> > Yes it enables cleaner shader support not only sysfs.
>>
>> It enables the functionality in the kernel. It can be turned on or
>> manually run via sysfs.
>>
>> Alex
>>
>> >
>> > Best regards,
>> > Srini
>> >
>> > Marek
>> >
>> > On Fri, Jan 24, 2025 at 1:42 AM Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> wrote:
>> >>
>> >> Enable the cleaner shader for GFX10.1.1/10.1.2 GPUs to provide data
>> >> isolation between GPU workloads. The cleaner shader is responsible for
>> >> clearing the Local Data Store (LDS), Vector General Purpose Registers
>> >> (VGPRs), and Scalar General Purpose Registers (SGPRs), which helps
>> >> prevent data leakage and ensures accurate computation results.
>> >>
>> >> This update extends cleaner shader support to GFX10.1.1/10.1.2 GPUs,
>> >> previously available for GFX10.1.10. It enhances security by clearing
>> >> GPU memory between processes and maintains a consistent GPU state across
>> >> KGD and KFD workloads.
>> >>
>> >> Cc: Christian König <christian.koenig@amd.com>
>> >> Cc: Alex Deucher <alexander.deucher@amd.com>
>> >> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
>> >> ---
>> >> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
>> >> 1 file changed, 2 insertions(+)
>> >>
>> >> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> >> index 1878c83ff7e3..938f7d60a0ee 100644
>> >> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> >> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>> >> @@ -4795,6 +4795,8 @@ static int gfx_v10_0_sw_init(struct amdgpu_ip_block *ip_block)
>> >> }
>> >> switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
>> >> case IP_VERSION(10, 1, 10):
>> >> + case IP_VERSION(10, 1, 1):
>> >> + case IP_VERSION(10, 1, 2):
>> >> adev->gfx.cleaner_shader_ptr = gfx_10_1_10_cleaner_shader_hex;
>> >> adev->gfx.cleaner_shader_size = sizeof(gfx_10_1_10_cleaner_shader_hex);
>> >> if (adev->gfx.me_fw_version >= 101 &&
>> >> --
>> >> 2.34.1
>> >>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-01-24 21:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24 6:34 [PATCH] drm/amdgpu/gfx10: Enable cleaner shader for GFX10.1.1/10.1.2 GPUs Srinivasan Shanmugam
2025-01-24 15:25 ` Alex Deucher
2025-01-24 16:31 ` Marek Olšák
2025-01-24 17:30 ` SRINIVASAN SHANMUGAM
2025-01-24 17:39 ` Alex Deucher
2025-01-24 21:33 ` Marek Olšák
2025-01-24 21:41 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.