Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oak Zeng <oak.zeng@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ashutosh.dixit@intel.com, matthew.brost@intel.com,
	zbigniew.kempczynski@intel.com, kamil.konieczny@intel.com
Subject: [i-g-t v7 4/4] tests/intel/xe_vm: Allow scratch page under fault mode on LNL and BMG
Date: Wed, 19 Mar 2025 18:42:31 -0400	[thread overview]
Message-ID: <20250319224231.1909393-5-oak.zeng@intel.com> (raw)
In-Reply-To: <20250319224231.1909393-1-oak.zeng@intel.com>

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@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;
+	}
+
 	do_ioctl_err(fd, DRM_IOCTL_XE_VM_CREATE, &create, EINVAL);
 }
 
-- 
2.26.3


  parent reply	other threads:[~2025-03-19 22:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 22:42 [i-g-t v7 0/4] xe: Test scratch page under fault mode Oak Zeng
2025-03-19 22:42 ` [i-g-t v7 1/4] lib/xe: Fix a comment error Oak Zeng
2025-03-19 22:42 ` [i-g-t v7 2/4] lib/xe/xe_util: Introduce helper functions Oak Zeng
2025-03-19 22:42 ` [i-g-t v7 3/4] tests/intel/xe_exec_fault_mode: Test scratch page under fault mode Oak Zeng
2025-03-19 22:42 ` Oak Zeng [this message]
2025-03-20  1:14   ` [i-g-t v7 4/4] tests/intel/xe_vm: Allow scratch page under fault mode on LNL and BMG Dixit, Ashutosh
2025-03-19 22:53 ` ✓ Xe.CI.BAT: success for xe: Test scratch page under fault mode (rev6) Patchwork
2025-03-19 23:19 ` ✗ i915.CI.BAT: failure " Patchwork
2025-03-19 23:40 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319224231.1909393-5-oak.zeng@intel.com \
    --to=oak.zeng@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=zbigniew.kempczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox