All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Ben Cheatham <Benjamin.Cheatham@amd.com>, linux-cxl@vger.kernel.org
Subject: Re: [RFC PATCH 00/18] Initial CXL.cache device support
Date: Wed, 10 Sep 2025 16:12:05 -0700	[thread overview]
Message-ID: <2f651b8a-6185-4a68-84f4-1e8dcd9dbcb5@intel.com> (raw)
In-Reply-To: <20250812212921.9548-1-Benjamin.Cheatham@amd.com>



On 8/12/25 2:29 PM, Ben Cheatham wrote:
> This patch series adds initial CXL.cache support. What I have here only
> allows for adding a cache device to the system, programming/validating
> the system configuration with respect to cache devices, and some basic
> cache reporting/management.
> 
> The general philosophy is to have an endpoint/vendor-specific driver
> that runs through the same steps of adding a cxl_memdev, but for the
> cache portion of the device (both type 1 & 2). Getting cache support for
> a CXL device should be as simple as: get cache information, set up the
> memory region (see below), and then calling devm_cxl_add_cachedev().
> 
> There's a couple of things missing from this set:
> 
> 1) Missing an endpoint driver
> 
> 	I plan on submitting a reference driver (type 1 or 2) with v1, I
> 	figured I'd send out what I have before going much further.

Hi Ben,

Don't mind getting this all sorted out and discussed. But we will need a real vendor device out there at some point as a user for all the code to be merged.

DJ

> 
> 2) Mapping/Reserving host memory used for CXL cache(s)
> 
> 	I'm thinking this will be handled by the endpoint driver, but I'm
> 	not sure what mechanism would be used and whether to integrate it
> 	with the cxl_cache/core. Any thoughts/ideas here are appreciated!
> 
> 3) RAS Support
> 
> 	Same situation as 1) above.
> 
> Some quick notes: The actual cache parts of this set are untested due
> to problems with my set up, but I did make sure nothing here breaks type
> 3 support. I'll have this fixed before sending out a v1. This series is
> based on the for-6.18/cxl-probe-order (commit 5e29cbd1077b) branch in
> the CXL repo, with v7 of Dave's deferred dport probe set on top [1]. I
> added Dave's set to help with getting around constraints with HDM
> decoders in CXL.cache device only configurations (see 08/18 for more).
> 
> Patch Breakdown:
> 	- 1 & 2: Preliminary changes for struct cxl_cachedev
> 	- 3: Add struct cxl_cachedev
> 	- 4-8: Preliminary changes for adding cache devices to port
> 	  hierarchy
> 	- 9: Function for getting CXL cache info
> 	- 10: cxl_cache driver (mirrors cxl_mem)
> 	- 11-16: Checking CXL.cache capabilities for system configuration
> 	  validity
> 	- 17-18: Cache device attributes
> 
> [1]:
> Link: https://lore.kernel.org/linux-cxl/20250714223527.461147-1-dave.jiang@intel.com/
> 
> Ben Cheatham (18):
>   cxl/mem: Change cxl_memdev_ops to cxl_dev_ops
>   cxl: Move struct cxl_dev_state definition
>   cxl/core: Add CXL.cache device struct
>   cxl: Replace cxl_mem_find_port() with cxl_dev_find_port()
>   cxl: Change cxl_ep_load() to use struct device * parameter
>   cxl/port, mem: Make adding an endpoint device type agnostic
>   cxl/port: Split endpoint port probe on device type
>   cxl/port: Update switch_port_probe() for CXL cache devices
>   cxl/core: Add function for getting CXL cache info
>   cxl/cache: Add cxl_cache driver
>   cxl/core: Add CXL snoop filter setup and checking
>   cxl/cache: Add CXL Cache ID Route Table mapping
>   cxl/cache: Implement Cache ID Route Table programming
>   cxl/cache: Add Cache ID Decoder capability mapping
>   cxl/cache: Implement Cache ID Decoder programming
>   cxl/cache: Add cache device counting for CXL ports
>   cxl/core: Add cache device attributes
>   cxl/core: Add cache device cache management attributes
> 
>  drivers/cxl/Kconfig         |  14 +
>  drivers/cxl/Makefile        |   2 +
>  drivers/cxl/cache.c         | 276 +++++++++++++++++++
>  drivers/cxl/core/Makefile   |   1 +
>  drivers/cxl/core/cachedev.c | 292 ++++++++++++++++++++
>  drivers/cxl/core/hdm.c      |  31 +++
>  drivers/cxl/core/memdev.c   |   2 +-
>  drivers/cxl/core/pci.c      | 134 ++++++++++
>  drivers/cxl/core/port.c     | 518 +++++++++++++++++++++++++++++++++---
>  drivers/cxl/core/region.c   |  25 +-
>  drivers/cxl/core/regs.c     |  28 ++
>  drivers/cxl/cxl.h           | 193 +++++++++++++-
>  drivers/cxl/cxlcache.h      |  42 +++
>  drivers/cxl/cxlmem.h        | 121 +--------
>  drivers/cxl/cxlpci.h        |  10 +
>  drivers/cxl/mem.c           |  14 +-
>  drivers/cxl/pci.c           |   2 +-
>  drivers/cxl/port.c          |  54 ++--
>  drivers/cxl/private.h       |   8 +-
>  19 files changed, 1569 insertions(+), 198 deletions(-)
>  create mode 100644 drivers/cxl/cache.c
>  create mode 100644 drivers/cxl/core/cachedev.c
>  create mode 100644 drivers/cxl/cxlcache.h
> 


  parent reply	other threads:[~2025-09-10 23:12 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 21:29 [RFC PATCH 00/18] Initial CXL.cache device support Ben Cheatham
2025-08-12 21:29 ` [RFC PATCH 01/18] cxl/mem: Change cxl_memdev_ops to cxl_dev_ops Ben Cheatham
2025-08-12 21:29 ` [RFC PATCH 02/18] cxl: Move struct cxl_dev_state definition Ben Cheatham
2025-08-19 11:33   ` Jonathan Cameron
2025-08-22 18:00     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 03/18] cxl/core: Add CXL.cache device struct Ben Cheatham
2025-08-19 11:48   ` Jonathan Cameron
2025-08-22 18:00     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 04/18] cxl: Replace cxl_mem_find_port() with cxl_dev_find_port() Ben Cheatham
2025-08-12 21:29 ` [RFC PATCH 05/18] cxl: Change cxl_ep_load() to use struct device * parameter Ben Cheatham
2025-08-12 21:29 ` [RFC PATCH 06/18] cxl/port, mem: Make adding an endpoint device type agnostic Ben Cheatham
2025-08-19 11:53   ` Jonathan Cameron
2025-08-22 18:00     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 07/18] cxl/port: Split endpoint port probe on device type Ben Cheatham
2025-08-19 11:57   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 08/18] cxl/port: Update switch_port_probe() for CXL cache devices Ben Cheatham
2025-08-19 12:03   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-09 16:20   ` Dave Jiang
2025-09-09 16:33     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 09/18] cxl/core: Add function for getting CXL cache info Ben Cheatham
2025-09-09 20:58   ` Dave Jiang
2025-09-10 15:55     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 10/18] cxl/cache: Add cxl_cache driver Ben Cheatham
2025-08-19 12:11   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-09 21:29   ` Dave Jiang
2025-09-10 15:52     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 11/18] cxl/core: Add CXL snoop filter setup and checking Ben Cheatham
2025-08-19 14:18   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-10 20:36   ` Dave Jiang
2025-09-18 20:15     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 12/18] cxl/cache: Add CXL Cache ID Route Table mapping Ben Cheatham
2025-08-19 15:09   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-10 21:22   ` Dave Jiang
2025-09-18 20:15     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 13/18] cxl/cache: Implement Cache ID Route Table programming Ben Cheatham
2025-08-19 15:07   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-10 21:37   ` Dave Jiang
2025-09-18 20:15     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 14/18] cxl/cache: Add Cache ID Decoder capability mapping Ben Cheatham
2025-08-19 14:12   ` Alireza Sanaee
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-10 21:56       ` Dave Jiang
2025-08-12 21:29 ` [RFC PATCH 15/18] cxl/cache: Implement Cache ID Decoder programming Ben Cheatham
2025-08-19 13:44   ` Alireza Sanaee
2025-08-20  8:55     ` Alireza Sanaee
2025-08-19 15:26   ` Jonathan Cameron
2025-08-22 18:01     ` Cheatham, Benjamin
2025-09-10 22:29   ` Dave Jiang
2025-09-18 20:16     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 16/18] cxl/cache: Add cache device counting for CXL ports Ben Cheatham
2025-08-19 15:30   ` Jonathan Cameron
2025-08-22 18:02     ` Cheatham, Benjamin
2025-09-10 22:51   ` Dave Jiang
2025-09-18 20:16     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 17/18] cxl/core: Add cache device attributes Ben Cheatham
2025-08-19 15:38   ` Jonathan Cameron
2025-08-22 18:02     ` Cheatham, Benjamin
2025-08-12 21:29 ` [RFC PATCH 18/18] cxl/core: Add cache device cache management attributes Ben Cheatham
2025-08-19 15:53   ` Jonathan Cameron
2025-08-22 18:02     ` Cheatham, Benjamin
2025-09-10 23:02   ` Dave Jiang
2025-09-18 20:16     ` Cheatham, Benjamin
2025-09-18 21:45       ` Dave Jiang
2025-09-19 13:42         ` Cheatham, Benjamin
2025-08-13 11:25 ` [RFC PATCH 00/18] Initial CXL.cache device support Alejandro Lucero Palau
2025-08-19 15:57   ` Jonathan Cameron
2025-08-19 16:05     ` Jonathan Cameron
2025-08-26 10:42       ` Alejandro Lucero Palau
2025-08-22 18:02   ` Cheatham, Benjamin
2025-08-26 10:44     ` Alejandro Lucero Palau
2025-09-10 23:12 ` Dave Jiang [this message]
2025-09-18 20:16   ` Cheatham, Benjamin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f651b8a-6185-4a68-84f4-1e8dcd9dbcb5@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Benjamin.Cheatham@amd.com \
    --cc=linux-cxl@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.