mbox series

[NDCTL,resend,0/5] ndctl: Add support and test for CXL features driver

Message ID 20250123002530.2762440-1-dave.jiang@intel.com
Headers show
Series ndctl: Add support and test for CXL features driver | expand

Message

Dave Jiang Jan. 23, 2025, 12:24 a.m. UTC
resend due to missing parts in last patch. Forgot to do stg refresh.

The series provides support of libcxl enumerating the 'features' device
exported by the CXL kernel driver. It discovers the char device major
and minor numbers for the CXL features device in order to allow issuing
of ioctls to the device. libcxl will also associate the 'features' device
with an 'endpoint' port device in order to allow finding the appropriate
char dev from the endpoint device. It feels appropriate to associate
with the endpoint device rather than the memdev since the features device
comes out of the mailbox of a CLX device that may or may not be a memdev.

A unit test is added to locate a feature device exported by the cxl_test
kernel module and issue all the supported ioctls to verify that all the
ioctl paths are working as expected.

Dave Jiang (5):
      cxl: Add cxl_bus_get_by_provider()
      cxl: Enumerate features 'devices'
      cxl: Add get major and minor for cxl features device
      cxl: Associate CXL features device with CXL endpoint
      cxl/test: Add test for cxl features device

 cxl/lib/libcxl.c     | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cxl/lib/libcxl.sym   |  13 +++
 cxl/lib/private.h    |  16 ++++
 cxl/libcxl.h         |  17 ++++
 test/cxl-features.sh |  17 ++++
 test/fwctl.c         | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 test/meson.build     |  16 ++++
 7 files changed, 749 insertions(+)