mbox series

[v2,for-next,0/3] RDMA: Provide an API for drivers to disassociate mmap pages

Message ID 20240812125640.1003948-1-huangjunxian6@hisilicon.com (mailing list archive)
Headers show
Series RDMA: Provide an API for drivers to disassociate mmap pages | expand

Message

Junxian Huang Aug. 12, 2024, 12:56 p.m. UTC
Provide an API rdma_user_mmap_disassociate() for drivers to disassociate
mmap pages. Use this API in hns to prevent userspace from ringing doorbell
when HW is reset.

v1 -> v2:
* Keep uverbs_user_mmap_disassociate() in uverbs_main.c. The new api
  rdma_user_mmap_disassociate() is also moved to this file.
* Add "#if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS)" to hns's
  rdma_user_mmap_disassociate() call.

Chengchang Tang (3):
  RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap
    pages
  RDMA/hns: Link all uctx to uctx_list on a device
  RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset

 drivers/infiniband/core/uverbs_main.c       | 21 +++++++++++++++++++++
 drivers/infiniband/hw/hns/hns_roce_device.h |  4 ++++
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c  | 17 +++++++++++++++++
 drivers/infiniband/hw/hns/hns_roce_main.c   | 13 +++++++++++++
 include/rdma/ib_verbs.h                     |  1 +
 5 files changed, 56 insertions(+)

--
2.33.0