[PATCH v2 0/1] drm/xe: support VM sharing between apps

Moti Haimovski mhaimovski at habana.ai
Tue Feb 13 20:38:28 UTC 2024


There can be devices which offer multiple hardware features each
requiring its own driver. In such case, there is always only one
primary driver which registers itself with the device. All other
drivers work as auxiliary drivers to the primary driver.
Based on software use case of the application there can be a
requirement to share virtual memory information between these drivers.
In current design virtual memory is exposed as an integer, this number
is tightly coupled with the application context. In this integer form,
VM information cannot be shared with other auxiliary drivers by the
application.
Taking inspiration from dma-buf framework, adding a new interface to
export the VM id as an FD. This FD is unique across the host and
encapsulates VM related configurations. Using this FD each application
can opaquely share VM info with other aux drivers.
This feature doesn't allow inter application sharing of VM information,
its purpose is to allow application for sharing its VM with another
driver contexts.
    
Bharat Jauhari (1):
  drm/xe: support sharing VM info between XE drivers

 drivers/gpu/drm/xe/xe_device.c   |   1 +
 drivers/gpu/drm/xe/xe_vm.c       | 107 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_vm.h       |   2 +
 drivers/gpu/drm/xe/xe_vm_types.h |  24 +++++++
 include/uapi/drm/xe_drm.h        |  27 ++++++++
 5 files changed, 161 insertions(+)

---
V2:
 * More comprehensive cover letter and commit messages (Zeng Oak)
 * Removed xe_file refcount patch,
   will use existing VM refcount instead (Thomas Hellström)

V1:
 * Initial release
-- 
2.34.1



More information about the Intel-xe mailing list