[i-g-t 2/2] tests/intel/xe_exec_fault_mode: Extend invalid va test
Kumar, Janga Rahul
janga.rahul.kumar at intel.com
Wed Mar 20 09:02:24 UTC 2024
> -----Original Message-----
> From: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>
> Sent: Wednesday, March 13, 2024 3:03 PM
> To: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>; Bommu, Krishnaiah
> <krishnaiah.bommu at intel.com>; Kumar, Janga Rahul
> <janga.rahul.kumar at intel.com>; igt-dev at lists.freedesktop.org
> Subject: [i-g-t 2/2] tests/intel/xe_exec_fault_mode: Extend invalid va test
>
> From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
>
> Extend invalid va test by enabling scratch page without pagefault and check for
> success of userfence.
>
> Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> Cc: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
> ---
> tests/intel/xe_exec_fault_mode.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_exec_fault_mode.c
> b/tests/intel/xe_exec_fault_mode.c
> index 0914e221b..9701d32ad 100644
> --- a/tests/intel/xe_exec_fault_mode.c
> +++ b/tests/intel/xe_exec_fault_mode.c
> @@ -32,12 +32,17 @@
> #define PREFETCH (0x1 << 5)
> #define INVALID_FAULT (0x1 << 6)
> #define INVALID_VA (0x1 << 7)
> +#define NOPAGEFAULT (0x1 << 8)
>
> /**
> * SUBTEST: invalid-va
> * Description: Access invalid va and check for EIO through user fence.
> * Test category: functionality test
> *
> + * SUBTEST: invalid-va-scratch-nopagefault
> + * Description: Access invalid va without pageafault with scratch page enabled.
> + * Test category: functionality test
> + *
> * SUBTEST: once-%s
> * Description: Run %arg[1] fault mode test only once
> * Test category: functionality test
> @@ -120,8 +125,12 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
>
> igt_assert(n_exec_queues <= MAX_N_EXEC_QUEUES);
>
> - vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_LR_MODE |
> - DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);
> + if (flags & NOPAGEFAULT)
> + vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_LR_MODE
> |
> + DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE,
> 0);
> + else
> + vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_LR_MODE
> |
> + DRM_XE_VM_CREATE_FLAG_FAULT_MODE,
> 0);
> bo_size = sizeof(*data) * n_execs;
> bo_size = xe_bb_size(fd, bo_size);
>
> @@ -386,6 +395,10 @@ igt_main
> xe_for_each_engine(fd, hwe)
> test_exec(fd, hwe, 1, 1, INVALID_VA);
>
> + igt_subtest("invalid-va-scratch-nopagefault")
> + xe_for_each_engine(fd, hwe)
> + test_exec(fd, hwe, 1, 1, NOPAGEFAULT);
Add INVALID_VA flag to check scratch page functionality.
Thanks,
Rahul
> +
> igt_fixture {
> drm_close_driver(fd);
> }
> --
> 2.25.1
More information about the igt-dev
mailing list