From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2059.outbound.protection.outlook.com [40.107.244.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8E1710E66C for ; Wed, 29 Nov 2023 20:15:47 +0000 (UTC) Message-ID: <1dc2450f-9e96-4b9b-af5d-eebb84c50aee@amd.com> Date: Wed, 29 Nov 2023 15:15:39 -0500 Content-Language: en-US To: Jesse Zhang , igt-dev@lists.freedesktop.org References: <20231129080307.135383-1-jesse.zhang@amd.com> From: vitaly prosyak In-Reply-To: <20231129080307.135383-1-jesse.zhang@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t] tests/amdgpu: fix secure bounce test issue List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , Luben Tuikov , Christian Koenig Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Hi Jesse, Which ASIC causes failure for this test for SDMA copy of secured buffer? 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 > Cc: Luben Tuikov > Cc: Alex Deucher > Cc: Christian Koenig > Cc: Kamil Konieczny Please, remove the empty line here and from other change also > Signed-off-by: Jesse Zhang > --- > 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; > + } > } > } >