Linux CXL
 help / color / mirror / Atom feed
* [PATCH v26 0/8] Type2 device basic support
@ 2026-04-23 18:05 alejandro.lucero-palau
  2026-04-23 18:05 ` [PATCH v26 1/8] sfc: add cxl support alejandro.lucero-palau
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: alejandro.lucero-palau @ 2026-04-23 18:05 UTC (permalink / raw)
  To: linux-cxl, djbw, edward.cree, davem, kuba, pabeni, edumazet,
	dave.jiang
  Cc: Alejandro Lucero

From: Alejandro Lucero <alucerop@amd.com>

I feel this version suits better a RFC based on v25 plus the changes
introduced. It tries to address the problem of user space actions
triggering accelerator region removal, and extending Dan's approach
in here:

https://lore.kernel.org/linux-cxl/20260403210050.1058650-1-dan.j.williams@intel.com/T/#m2d9e5c59ce4873641037f9bcd2f70d5679cda03c

As discussed there, the protection needs to cover the accelerator driver
handling of the region physical range for things like ioremap, and to
offer a way for such driver to undo things or at least stop using that
very same physical range if the region disappears. It ends up merging
several of v25 patches into just one.

Another change is linking the region release to the endpoint device and
keep with Dan's autoremove. This makes unnecessary the previous cxl_exit
and similar actions are now performed inside region detach callback.

I think the outcome is quite promising, lowering the accelerator driver
complexity regarding region handling. The cost is those new callbacks
which I think are totally necessary for doing things safely with the
region by the driver.

I have successfully tested the cases of cxl_acpi removal while sfc
driver remaining, and cxl_mem unbinding sfc cxl memdev.

v26 changes:
 - patch 6: it implements all the new functionlity described above.
 - patch 8: region detach callback invokes a new sfc function for safely
	    stopping cxl-backed piobufs use.

Alejandro Lucero (8):
  sfc: add cxl support
  cxl/sfc: Map cxl regs
  cxl/sfc: Initialize dpa without a mailbox
  cxl: Prepare memdev creation for type2
  sfc: create type2 cxl memdev
  cxl: attach region to an accelerator/type2 memdev
  cxl: Avoid dax creation for accelerators
  sfc: support pio mapping based on cxl

 drivers/cxl/core/core.h               |   2 +
 drivers/cxl/core/mbox.c               |  51 +---------
 drivers/cxl/core/memdev.c             |  81 +++++++++++++++-
 drivers/cxl/core/pci.c                |   1 +
 drivers/cxl/core/port.c               |   1 +
 drivers/cxl/core/region.c             | 125 ++++++++++++++++++++++++-
 drivers/cxl/core/regs.c               |   1 +
 drivers/cxl/cxlmem.h                  |   6 --
 drivers/cxl/cxlpci.h                  |  12 ---
 drivers/cxl/mem.c                     |  45 ++++++---
 drivers/cxl/pci.c                     |   1 +
 drivers/net/ethernet/sfc/Kconfig      |   9 ++
 drivers/net/ethernet/sfc/Makefile     |   1 +
 drivers/net/ethernet/sfc/ef10.c       |  72 +++++++++++++--
 drivers/net/ethernet/sfc/efx.c        |  14 ++-
 drivers/net/ethernet/sfc/efx.h        |   1 +
 drivers/net/ethernet/sfc/efx_cxl.c    | 128 ++++++++++++++++++++++++++
 drivers/net/ethernet/sfc/efx_cxl.h    |  31 +++++++
 drivers/net/ethernet/sfc/net_driver.h |  12 +++
 drivers/net/ethernet/sfc/nic.h        |   3 +
 include/cxl/cxl.h                     |  25 +++++
 include/cxl/pci.h                     |  22 +++++
 22 files changed, 552 insertions(+), 92 deletions(-)
 create mode 100644 drivers/net/ethernet/sfc/efx_cxl.c
 create mode 100644 drivers/net/ethernet/sfc/efx_cxl.h
 create mode 100644 include/cxl/pci.h


base-commit: 6596a02b207886e9e00bb0161c7fd59fea53c081
-- 
2.34.1


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

end of thread, other threads:[~2026-05-05 20:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 18:05 [PATCH v26 0/8] Type2 device basic support alejandro.lucero-palau
2026-04-23 18:05 ` [PATCH v26 1/8] sfc: add cxl support alejandro.lucero-palau
2026-04-29 21:14   ` Cheatham, Benjamin
2026-05-01 10:07     ` Alejandro Lucero Palau
2026-04-23 18:05 ` [PATCH v26 2/8] cxl/sfc: Map cxl regs alejandro.lucero-palau
2026-04-23 18:05 ` [PATCH v26 3/8] cxl/sfc: Initialize dpa without a mailbox alejandro.lucero-palau
2026-04-23 18:05 ` [PATCH v26 4/8] cxl: Prepare memdev creation for type2 alejandro.lucero-palau
2026-04-30 23:23   ` Dan Williams (nvidia)
2026-04-23 18:05 ` [PATCH v26 5/8] sfc: create type2 cxl memdev alejandro.lucero-palau
2026-04-23 18:05 ` [PATCH v26 6/8] cxl: attach region to an accelerator/type2 memdev alejandro.lucero-palau
2026-04-29 21:14   ` Cheatham, Benjamin
2026-05-01 10:35     ` Alejandro Lucero Palau
2026-05-01  2:00   ` Dan Williams (nvidia)
2026-05-01 10:59     ` Alejandro Lucero Palau
2026-05-02  0:46       ` Dan Williams (nvidia)
2026-05-05 20:51         ` Alejandro Lucero Palau
2026-04-23 18:05 ` [PATCH v26 7/8] cxl: Avoid dax creation for accelerators alejandro.lucero-palau
2026-04-29 21:14   ` Cheatham, Benjamin
2026-04-23 18:05 ` [PATCH v26 8/8] sfc: support pio mapping based on cxl alejandro.lucero-palau
2026-04-23 22:07 ` [PATCH v26 0/8] Type2 device basic support Dave Jiang

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