Add initial CXL.cache support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest15 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | cxl/core: Add CXL.cache device structdrivers/ drivers/ drivers/ +3 more | +163 | 0 replies | |
| 2/15 | cxl/cache: Add cxl_cache driverdrivers/ drivers/ drivers/ +5 more | +186 | 0 replies | |
| 3/15 | cxl/core: Change cxl_ep_load() to use device pointer parameterdrivers/ drivers/ drivers/ +1 more | +17 | 0 replies | |
| 4/15 | cxl/core: Update devm_cxl_enumerate_ports() for cxl_cachedevsdrivers/ drivers/ drivers/ | +67 | 0 replies | |
| 5/15 | cxl/port: Split endpoint port probe on device typedrivers/ drivers/ drivers/ +3 more | +73 | 0 replies | |
| 6/15 | cxl/core: Update devm_cxl_add_endpoint() for cxl_cachedevsdrivers/ drivers/ drivers/ +2 more | +69 | 0 replies | |
| 7/15 | cxl/cache: Verify port hierarchy has CXL.cache enableddrivers/ include/ | +79 | 0 replies | |
| 8/15 | cxl/core, cache: Add Cache ID register probing and initdrivers/ drivers/ drivers/ +4 more | +103 | 0 replies | |
| 9/15 | cxl/core: Add Cache ID verificationdrivers/ drivers/ drivers/ +4 more | +278 | 0 replies | |
| 10/15 | cxl/core: Add Cache ID allocationdrivers/ drivers/ drivers/ +1 more | +359 | 0 replies | |
| 11/15 | cxl/core: Add support for HDM-D cache id programmingdrivers/ drivers/ drivers/ | +49 | 0 replies | |
| 12/15 | cxl/cache: Add snoop filter creation and set updrivers/ drivers/ drivers/ +4 more | +166 | 0 replies | |
| 13/15 | cxl/cache: Add snoop filter allocationdrivers/ drivers/ drivers/ +1 more | +162 | 0 replies | |
| 14/15 | iommu, cxl: Configure IOMMU for CXL.cachedrivers/ drivers/ drivers/ +5 more | +175 | 0 replies | |
| 15/15 | cxl/cache: Enable CXL.cache on successful probedrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/15] Add initial CXL.cache support
This series adds support for CXL.cache devices to the CXL subsystem. The set includes the following:
- Updates to the existing CXL infrastructure to enable adding CXL.cache devices (struct cxl_cachedev) to the driver
- Support for cache id and snoop filter capabilities
- IOMMU updates to allow CXL.cache ATS requests
- Driver for struct cxl_cachedev devices that calls all of the above
The vast majority of the support is gated behind CONFIG_CXL_CACHE since CXL.cache devices aren't commonplace. This set is untested since I don't (currently) have access to a CXL.cache-capable device. Using multiple devices requires cache id capabilties, which may not be available depending on the platform (for AMD it's Venice or later).
There is a major missing piece in this set: There's no endpoint driver that adds a cxl_cachedev device, so this code is currently unused. I was planning on only sending this out once I had a device, but the plans for the device I was planning to support fell through and I didn't want to just sit on this.
Another thing that's missing is mapping host memory for CXL.cache use. I think the DMA API *should* just work after these changes, but it's not tested. I originally had the CXL core driver set up the DMA range for the endpoint driver, but it didn't end up making much sense. So, I've left the implementation for the (eventual) endpoint driver.
Thanks,
Ben
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935 (v7.3-rc1)
Ben Cheatham (15):
cxl/core: Add CXL.cache device struct
cxl/cache: Add cxl_cache driver
cxl/core: Change cxl_ep_load() to use device pointer parameter cxl/core: Update devm_cxl_enumerate_ports() for cxl_cachedevs cxl/port: Split endpoint port probe on device type cxl/core: Update devm_cxl_add_endpoint() for cxl_cachedevs cxl/cache: Verify port hierarchy has CXL.cache enabled cxl/core, cache: Add Cache ID register probing and init cxl/core: Add Cache ID verification
cxl/core: Add Cache ID allocation
cxl/core: Add support for HDM-D cache id programming cxl/cache: Add snoop filter creation and set up cxl/cache: Add snoop filter allocation
iommu, cxl: Configure IOMMU for CXL.cache
cxl/cache: Enable CXL.cache on successful probe
drivers/cxl/Kconfig | 14 + drivers/cxl/Makefile | 6 +- drivers/cxl/cache.c | 285 ++++++++++ drivers/cxl/core/Makefile | 2 + drivers/cxl/core/cache.c | 851 ++++++++++++++++++++++++++++ drivers/cxl/core/cachedev.c | 131 +++++ drivers/cxl/core/core.h | 7 + drivers/cxl/core/memdev.c | 1 + drivers/cxl/core/pci.c | 78 ++- drivers/cxl/core/port.c | 149 +++-- drivers/cxl/core/region.c | 24 +- drivers/cxl/core/regs.c | 30 + drivers/cxl/cxl.h | 74 ++- drivers/cxl/cxlcache.h | 50 ++ drivers/cxl/cxlmem.h | 4 +- drivers/cxl/mem.c | 4 +- drivers/cxl/port.c | 97 +++- drivers/iommu/amd/amd_iommu_types.h | 4 + drivers/iommu/amd/init.c | 14 + drivers/iommu/amd/iommu.c | 56 +- drivers/iommu/iommu.c | 28 + include/cxl/cxl.h | 78 ++- include/linux/iommu.h | 8 + include/uapi/linux/pci_regs.h | 8 + 24 files changed, 1911 insertions(+), 92 deletions(-) create mode 100644 drivers/cxl/cache.c create mode 100644 drivers/cxl/core/cache.c create mode 100644 drivers/cxl/core/cachedev.c create mode 100644 drivers/cxl/cxlcache.h
Signature · 1 line
2.53.0