[PATCH 04/12] tests/amdgpu: add secure buffer allocation test for invisible VRAM
Aaron Liu
aaron.liu at amd.com
Fri Nov 15 03:34:47 UTC 2019
From: Huang Rui <ray.huang at amd.com>
This patch is to add secure buffer allocation test for invisible VRAM.
Signed-off-by: Huang Rui <ray.huang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
tests/amdgpu/security_tests.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c
index afe79e5..a3807ee 100644
--- a/tests/amdgpu/security_tests.c
+++ b/tests/amdgpu/security_tests.c
@@ -102,4 +102,14 @@ 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 invisible VRAM */
+ bo = gpu_mem_alloc(device_handle, 4096, 4096,
+ AMDGPU_GEM_DOMAIN_GTT,
+ AMDGPU_GEM_CREATE_ENCRYPTED |
+ AMDGPU_GEM_CREATE_NO_CPU_ACCESS,
+ &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