Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/vm: Wait for availability if fault mode is mismatched
@ 2024-05-03 19:01 Jonathan Cavitt
  2024-05-03 21:51 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jonathan Cavitt @ 2024-05-03 19:01 UTC (permalink / raw)
  To: intel-xe
  Cc: saurabhg.gupta, jonathan.cavitt, brian.welty, tomasz.mistat,
	himanshu.girotra

Just because xe_device_in_non_fault_mode (or, equivalently,
xe_device_in_fault_mode) do not match the requested VM type does not
mean that running the VM in that mode is invalid.  It only means that
there presently exists a VM active on the system that does not match the
requested type.  The VM could be left over from an old test that wasn't
cleaned up properly, but the more likely cause is that multiple tests
running concurrently is resulting in the system falsely report that the
VM fault mode is not supported.

Instead of saying the VM cannot be created, ask the user to try again later.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1562
Suggested-by: Brian Welty: <brian.welty@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index c0cf531a115d2..8541cfd50730e 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2057,11 +2057,11 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
 
 	if (XE_IOCTL_DBG(xe, args->flags & DRM_XE_VM_CREATE_FLAG_FAULT_MODE &&
 			 xe_device_in_non_fault_mode(xe)))
-		return -EINVAL;
+		return -EBUSY;
 
 	if (XE_IOCTL_DBG(xe, !(args->flags & DRM_XE_VM_CREATE_FLAG_FAULT_MODE) &&
 			 xe_device_in_fault_mode(xe)))
-		return -EINVAL;
+		return -EBUSY;
 
 	if (XE_IOCTL_DBG(xe, args->extensions))
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-08  0:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03 19:01 [PATCH] drm/xe/vm: Wait for availability if fault mode is mismatched Jonathan Cavitt
2024-05-03 21:51 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-03 21:51 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-03 21:52 ` ✓ CI.KUnit: success " Patchwork
2024-05-03 22:10 ` ✓ CI.Build: " Patchwork
2024-05-03 22:13 ` ✓ CI.Hooks: " Patchwork
2024-05-03 22:14 ` ✓ CI.checksparse: " Patchwork
2024-05-03 22:51 ` ✓ CI.BAT: " Patchwork
2024-05-04  1:58 ` ✗ CI.FULL: failure " Patchwork
2024-05-08  0:45 ` [PATCH] " Welty, Brian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox