[PATCH 03/12] tests/amdgpu: add secure buffer allocation test for system memory
Aaron Liu
aaron.liu at amd.com
Fri Nov 15 03:34:46 UTC 2019
From: Huang Rui <ray.huang at amd.com>
This patch is to add secure buffer allocation test for system memory.
Signed-off-by: Huang Rui <ray.huang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
tests/amdgpu/security_tests.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c
index 182b03d..afe79e5 100644
--- a/tests/amdgpu/security_tests.c
+++ b/tests/amdgpu/security_tests.c
@@ -93,4 +93,13 @@ static void amdgpu_security_alloc_buf_test(void)
r = gpu_mem_free(bo, va_handle, bo_mc, 4096);
CU_ASSERT_EQUAL(r, 0);
+
+ /* Test secure buffer allocation in system memory */
+ bo = gpu_mem_alloc(device_handle, 4096, 4096,
+ AMDGPU_GEM_DOMAIN_GTT,
+ AMDGPU_GEM_CREATE_ENCRYPTED,
+ &bo_mc, &va_handle);
+
+ r = gpu_mem_free(bo, va_handle, bo_mc, 4096);
+ CU_ASSERT_EQUAL(r, 0);
}
--
2.7.4
More information about the amd-gfx
mailing list