[i-g-t v7 4/4] tests/intel/xe_vm: Allow scratch page under fault mode on LNL and BMG

Dixit, Ashutosh ashutosh.dixit at intel.com
Thu Mar 20 01:14:06 UTC 2025


On Wed, 19 Mar 2025 15:42:31 -0700, Oak Zeng wrote:
>
> Due to a fix of out of bound prefetch issue, we now allow scratch
> page coexist with fault mode on LNL and BMG. Modify invalid_flag
> test to reflect this change.
>
> v1: make the change in invalid_flag (vs caller) (Ashutosh)
>
> Signed-off-by: Oak Zeng <oak.zeng at intel.com>
> ---
>  tests/intel/xe_vm.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index fdf74c114..928baf0de 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -2259,10 +2259,17 @@ static void bind_flag_invalid(int fd)
>
>  static void invalid_flag(int fd, __u32 flags)
>  {
> +	uint16_t dev_id = intel_get_drm_devid(fd);
>	struct drm_xe_vm_create create = {
>		.flags = flags,
>	};
>
> +	if (IS_LUNARLAKE(dev_id) || IS_BATTLEMAGE(dev_id)) {
> +		if ((flags & DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE) &&
> +		    (flags & DRM_XE_VM_CREATE_FLAG_FAULT_MODE))
> +			return;
> +	}

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

But note that the above code will show the test as successful, which may be
ok. If you want to show the test as skipping instead, use igt_skip_on().

> +
>	do_ioctl_err(fd, DRM_IOCTL_XE_VM_CREATE, &create, EINVAL);
>  }
>
> --
> 2.26.3
>


More information about the igt-dev mailing list