All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>
Cc: <igt-dev@lists.freedesktop.org>,
	<kamil.konieczny@linux.intel.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_exec_fault_mode: Don't return early
Date: Tue, 27 Aug 2024 15:52:15 +0000	[thread overview]
Message-ID: <Zs32L7Y9GePDfXUg@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240827105222.13650-1-nirmoy.das@intel.com>

On Tue, Aug 27, 2024 at 12:52:22PM +0200, Nirmoy Das wrote:
> Tests that are causing pagefaults should wait for exec queue to be ban
> otherwise pending engine resets because of on-going pagefaults would
> cause failure in subsequent tests to fail.
> 
> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  tests/intel/xe_exec_fault_mode.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
> index 1f1f1e50b..339c79353 100644
> --- a/tests/intel/xe_exec_fault_mode.c
> +++ b/tests/intel/xe_exec_fault_mode.c
> @@ -36,6 +36,22 @@
>  #define INVALID_VA	(0x1 << 8)
>  #define ENABLE_SCRATCH  (0x1 << 9)
>  
> +static int get_ban_property(int xe, struct drm_xe_engine_class_instance *eci,
> +			    uint32_t vm, uint32_t exec_queue)
> +{
> +	struct drm_xe_exec_queue_get_property args = {
> +		.value = -1,
> +		.reserved[0] = 0,
> +		.property = DRM_XE_EXEC_QUEUE_GET_PROPERTY_BAN,
> +	};
> +
> +	args.exec_queue_id = exec_queue;
> +
> +	do_ioctl(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args);
> +
> +	return args.value;
> +}
> +
>  /**
>   * SUBTEST: invalid-va
>   * Description: Access invalid va and check for EIO through user fence.
> @@ -324,6 +340,17 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
>  	xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
>  		       bind_exec_queues[0], NSEC_PER_SEC);
>  
> +	if ((flags & INVALID_FAULT)) {
> +		igt_set_timeout(1, "");
> +		for (i = 0; i < n_execs; i++) {
> +			int e = i % n_exec_queues;
> +				while (!get_ban_property(fd, eci, vm,
> +							 exec_queues[e]))
> +					sched_yield();
> +		}
> +		igt_reset_timeout();
> +	}
> +
>  	if (!(flags & INVALID_FAULT) && !(flags & INVALID_VA)) {
>  		for (i = j; i < n_execs; i++)
>  				igt_assert_eq(data[i].data, 0xc0ffee);
> -- 
> 2.42.0
> 

  parent reply	other threads:[~2024-08-27 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 10:52 [PATCH i-g-t] tests/intel/xe_exec_fault_mode: Don't return early Nirmoy Das
2024-08-27 14:07 ` Andrzej Hajda
2024-08-27 14:27   ` Nirmoy Das
2024-08-27 15:31 ` ✓ CI.xeBAT: success for " Patchwork
2024-08-27 15:43 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-27 15:52 ` Matthew Brost [this message]
2024-08-27 16:12   ` [PATCH i-g-t] " Nirmoy Das
2024-08-27 22:55 ` ✗ CI.xeFULL: failure for " Patchwork
2024-08-28 19:27 ` ✗ Fi.CI.IGT: " 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=Zs32L7Y9GePDfXUg@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=nirmoy.das@intel.com \
    --cc=tejas.upadhyay@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.