[i-g-t v6 3/4] tests/intel/xe_vm: Exclude invalid_flags tests from LNL and BMG
Zeng, Oak
oak.zeng at intel.com
Wed Mar 19 21:51:30 UTC 2025
Hi Ashutosh,
> -----Original Message-----
> From: Dixit, Ashutosh <ashutosh.dixit at intel.com>
> Sent: March 10, 2025 8:34 PM
> To: Zeng, Oak <oak.zeng at intel.com>
> Cc: igt-dev at lists.freedesktop.org
> Subject: Re: [i-g-t v6 3/4] tests/intel/xe_vm: Exclude invalid_flags
> tests from LNL and BMG
>
> On Mon, 24 Feb 2025 09:40:09 -0800, 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, thus exclude those
> > tests on such HW.
>
> Instead of making all these changes in this patch, isn't it cleaner to
> include the platform check for
> DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE in
> invalid_flag() itself?
Yes, that is a good idea. I will make the change.
>
> Also is it just LNL and BMG, or other future platforms too? In that case
> instead of using IS_LUNARLAKE() kind of macros, use
> intel_graphics_ver()
> checks, so we don't need to keep adding a new patch/check for each
> platform.
It is only for LNL and BMG, not for future HW. The reason is, in future HW
We plan to have a real HW fix of the oob prefetch issue, thus we don't need
The xekmd SW workaround (of enabling scratch page under fault mode). So
In the future HW, we also don't allow the co-exist of scratch and fault.
Thanks,
Oak
>
> >
> > Signed-off-by: Oak Zeng <oak.zeng at intel.com>
> > ---
> > tests/intel/xe_vm.c | 47 ++++++++++++++++++++++++++++++----
> -----------
> > 1 file changed, 32 insertions(+), 15 deletions(-)
> >
> > diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> > index 0730dd3d3..834e0afd7 100644
> > --- a/tests/intel/xe_vm.c
> > +++ b/tests/intel/xe_vm.c
> > @@ -2349,6 +2349,7 @@ igt_main
> > struct drm_xe_engine_class_instance *hwe,
> *hwe_non_copy = NULL;
> > uint64_t bind_size;
> > int fd;
> > + uint16_t dev_id;
> > const struct section {
> > const char *name;
> > int bo_n_pages;
> > @@ -2441,23 +2442,28 @@ igt_main
> > { NULL },
> > };
> >
> > - const struct vm_create_section {
> > - const char *name;
> > - __u32 flags;
> > - } xe_vm_create_invalid_flags[] = {
> > - { "xe_vm_create_fault",
> DRM_XE_VM_CREATE_FLAG_FAULT_MODE },
> > - { "xe_vm_create_scratch_fault",
> > - DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE |
> > - DRM_XE_VM_CREATE_FLAG_FAULT_MODE },
> > - { "xe_vm_create_scratch_fault_lr",
> > - ~(DRM_XE_VM_CREATE_FLAG_LR_MODE |
> > - DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE |
> > - DRM_XE_VM_CREATE_FLAG_FAULT_MODE) },
> > - { }
> > - };
> > + const struct vm_create_section {
> > + const char *name;
> > + __u32 flags;
> > + } xe_vm_create_invalid_flags1[] = {
> > + { "xe_vm_create_fault",
> DRM_XE_VM_CREATE_FLAG_FAULT_MODE },
> > + { }
> > + };
> > +
> > + const struct vm_create_section
> xe_vm_create_invalid_flags2[] = {
> > + { "xe_vm_create_scratch_fault",
> > +
> DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE |
> > + DRM_XE_VM_CREATE_FLAG_FAULT_MODE },
> > + { "xe_vm_create_scratch_fault_lr",
> > + ~(DRM_XE_VM_CREATE_FLAG_LR_MODE |
> > +
> DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE |
> > +
> DRM_XE_VM_CREATE_FLAG_FAULT_MODE) },
> > + { }
> > + };
> >
> > igt_fixture {
> > fd = drm_open_driver(DRIVER_XE);
> > + dev_id = intel_get_drm_devid(fd);
> >
> > xe_for_each_engine(fd, hwe)
> > if (hwe->engine_class !=
> DRM_XE_ENGINE_CLASS_COPY) {
> > @@ -2715,11 +2721,22 @@ igt_main
> > }
> > }
> >
> > - for (const struct vm_create_section *s =
> xe_vm_create_invalid_flags; s->name; s++) {
> > + for (const struct vm_create_section *s =
> xe_vm_create_invalid_flags1;
> > + s->name; s++) {
> > igt_subtest_f("invalid-flag-%s", s->name)
> > invalid_flag(fd, s->flags);
> > }
> >
> > + for (const struct vm_create_section *s =
> xe_vm_create_invalid_flags2;
> > + s->name; s++) {
> > + igt_subtest_f("invalid-flag-%s", s->name) {
> > + igt_skip_on_f(IS_LUNARLAKE(dev_id) ||
> > + IS_BATTLEMAGE(dev_id),
> > + "Skip test on this platform\n");
> > + invalid_flag(fd, s->flags);
> > + }
> > + }
> > +
> > igt_subtest("invalid-extensions")
> > invalid_extensions(fd);
> >
> > --
> > 2.26.3
> >
More information about the igt-dev
mailing list