[PATCH] drm/xe/vm: Wait for availability if fault mode is mismatched
Jonathan Cavitt
jonathan.cavitt at intel.com
Fri May 3 19:01:38 UTC 2024
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 at intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt at 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
More information about the Intel-xe
mailing list