From: Jesse Zhang <jesse.zhang@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Luben Tuikov <luben.tuikov@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>
Subject: [igt-dev] [PATCH i-g-t] tests/amdgpu: fix secure bounce test issue
Date: Wed, 29 Nov 2023 16:03:07 +0800 [thread overview]
Message-ID: <20231129080307.135383-1-jesse.zhang@amd.com> (raw)
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@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@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;
+ }
}
}
--
2.25.1
next reply other threads:[~2023-11-29 8:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 8:03 Jesse Zhang [this message]
2023-11-29 8:53 ` [igt-dev] ✓ CI.xeBAT: success for tests/amdgpu: fix secure bounce test issue Patchwork
2023-11-29 8:55 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-11-29 20:15 ` [igt-dev] [PATCH i-g-t] " vitaly prosyak
2023-11-30 1:09 ` Zhang, Jesse(Jie)
2023-11-30 3:16 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
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=20231129080307.135383-1-jesse.zhang@amd.com \
--to=jesse.zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=luben.tuikov@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