[igt-dev] [PATCH i-g-t] tests/amdgpu: fix secure bounce test issue

Zhang, Jesse(Jie) Jesse.Zhang at amd.com
Thu Nov 30 01:09:07 UTC 2023


[AMD Official Use Only - General]

-----Original Message-----
From: Prosyak, Vitaly <Vitaly.Prosyak at amd.com>
Sent: Thursday, November 30, 2023 4:16 AM
To: Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>; igt-dev at lists.freedesktop.org
Cc: Prosyak, Vitaly <Vitaly.Prosyak at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Tuikov, Luben <Luben.Tuikov at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Kamil Konieczny <kamil.konieczny at linux.intel.com>
Subject: Re: [PATCH i-g-t] tests/amdgpu: fix secure bounce test issue

Hi Jesse,

Which ASIC causes failure for this test for SDMA copy of secured buffer?
[Zhang, Jesse(Jie)] Hi Vitaly,
APU GFX11 test failed when run the secure bounce.
Thanks
Jesse

Thanks, Vitaly

On 2023-11-29 03:03, Jesse Zhang wrote:
> To the secure memory, the destination data(bo2) has been encrypted,
> after copying it via SDMA from bo to bo2.
> It cannot compare bo2 with the original data.
> Therefore, skip this memory check.
>
> Cc: Vitaly Prosyak <vitaly.prosyak at amd.com>
> Cc: Luben Tuikov <luben.tuikov at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian Koenig <christian.koenig at amd.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Please, remove the empty line here and from other change also
> Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
> ---
>  tests/amdgpu/amd_security.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/tests/amdgpu/amd_security.c b/tests/amdgpu/amd_security.c
> index d1146a7ce..678270fdf 100644
> --- a/tests/amdgpu/amd_security.c
> +++ b/tests/amdgpu/amd_security.c
> @@ -225,14 +225,16 @@ amdgpu_secure_bounce(amdgpu_device_handle device_handle, int fd,
>                       secure == true ? 1 : 0);
>
>       /* Verify the contents of Bob. */
> -     for (pp = (__typeof__(pp))ring_context->bo2_cpu;
> -          pp < (__typeof__(pp)) ring_context->bo2_cpu + SECURE_BUFFER_SIZE;
> -          pp += sizeof(secure_pattern)) {
> -             r = memcmp(pp, secure_pattern, sizeof(secure_pattern));
> -             if (r) {
> -                     // test failure
> -                     igt_assert(false);
> -                     break;
> +     if (!secure) {
> +             for (pp = (__typeof__(pp))ring_context->bo2_cpu;
> +                     pp < (__typeof__(pp)) ring_context->bo2_cpu + SECURE_BUFFER_SIZE;
> +                     pp += sizeof(secure_pattern)) {
> +                     r = memcmp(pp, secure_pattern, sizeof(secure_pattern));
> +                     if (r) {
> +                             // test failure
> +                             igt_assert(false);
> +                             break;
> +                     }
>               }
>       }
>


More information about the igt-dev mailing list