nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH v2 00/13] Initial CXL support
@ 2021-02-19  2:03 Vishal Verma
  2021-02-19  2:03 ` [ndctl PATCH v2 01/13] cxl: add a cxl utility and libcxl library Vishal Verma
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Vishal Verma @ 2021-02-19  2:03 UTC (permalink / raw)
  To: linux-cxl; +Cc: linux-nvdimm, Ben Widawsky

Changes since v1[1]:

- Add 'firmware_version' retrieval for memdevs via sysfs attribute
- Add private data storage and accessors for libcxl
- Add a local copy of the UAPI header (cxl_mem.h)
- Refactor 'Identify' command support into a single patch
- Add libcxl APIs for get_lsa
- Add libcxl APIs for get_health_info
- Add libcxl APIs for firmware_status and out.size from cmd response
- Refactor common test helpers to make them more generic
- Add a hexdump helper in util/
- Add a new unit test, test/libcxl which tests:
  - Basic sanity tests
  - Module unload/load
  - identify device command
  - set_lsa (via RAW mode) command
  - get_lsa command
  - fuzzes command input/output payload sizes
- Fix install location of cxl headers
- Add section 3 man pages for libcxl API documentation (only two pages
  added so far).

[1]: https://lore.kernel.org/linux-cxl/20210112003403.2944568-1-vishal.l.verma@intel.com/

---

Add a new utility and library to support CXL devices. This comprehends
the kernel's sysfs layout for CXL devices, and implements a command
submission harness for CXL mailbox commands via ioctl()s defined by the
cxl_mem driver.

A 'cxl-list' command is added which uses some of the libcxl APIs to
display a listing of CXL devices that includes attributes obtained via
sysfs.

Additionally, a new unit test is added to test the library and kernel
(ioctl) interfaces. This includes basic functionality tests for a subset
of the mailbox commands, as well as some negative tests to validate
graceful handling of malformed commands with unexpected buffer sizing
for payloads.

The unit tests are tied to the QEMU implementation[2] of CXL devices.

The latest kernel patches can be found at [3].
An ndctl branch with these patches is also available at [4]

[2]: https://lore.kernel.org/linux-cxl/20210202005948.241655-1-ben.widawsky@intel.com
[3]: https://lore.kernel.org/linux-cxl/20210217040958.1354670-1-ben.widawsky@intel.com
[4]: https://github.com/pmem/ndctl/tree/cxl-2.0v2


Vishal Verma (13):
  cxl: add a cxl utility and libcxl library
  cxl: add a local copy of the cxl_mem UAPI header
  libcxl: add support for command query and submission
  libcxl: add support for the 'Identify Device' command
  test: rename 'ndctl_test' to 'test_ctx'
  test: rename 'ndctl_test_*' helpers to 'test_*'
  test: introduce a libcxl unit test
  libcxl: add GET_HEALTH_INFO mailbox command and accessors
  libcxl: add support for the 'GET_LSA' command
  util/hexdump: Add a util helper to print a buffer in hex
  test/libcxl: add a test for {set, get}_lsa commands
  Documentation/cxl: add library API documentation
  test/libcxl: introduce a command size fuzzing test

 Documentation/cxl/cxl-list.txt       |  65 ++
 Documentation/cxl/cxl.txt            |  34 ++
 Documentation/cxl/human-option.txt   |   8 +
 Documentation/cxl/lib/cxl_new.txt    |  43 ++
 Documentation/cxl/lib/libcxl.txt     |  56 ++
 Documentation/cxl/verbose-option.txt |   5 +
 configure.ac                         |   4 +
 Makefile.am                          |  10 +-
 Makefile.am.in                       |   5 +
 cxl/lib/private.h                    |  97 +++
 cxl/lib/libcxl.c                     | 879 +++++++++++++++++++++++++++
 cxl/builtin.h                        |   8 +
 cxl/cxl_mem.h                        | 181 ++++++
 cxl/libcxl.h                         |  82 +++
 test.h                               |  40 +-
 test/libcxl-expect.h                 |  13 +
 util/filter.h                        |   2 +
 util/hexdump.h                       |   8 +
 util/json.h                          |   3 +
 util/main.h                          |   3 +
 cxl/cxl.c                            |  95 +++
 cxl/list.c                           | 113 ++++
 ndctl/bat.c                          |   8 +-
 ndctl/test.c                         |   8 +-
 test/ack-shutdown-count-set.c        |  16 +-
 test/blk_namespaces.c                |  14 +-
 test/core.c                          |  32 +-
 test/dax-dev.c                       |  10 +-
 test/dax-pmd.c                       |  13 +-
 test/dax-poison.c                    |   6 +-
 test/daxdev-errors.c                 |   2 +-
 test/device-dax.c                    |  24 +-
 test/dpa-alloc.c                     |  14 +-
 test/dsm-fail.c                      |  14 +-
 test/libcxl.c                        | 514 ++++++++++++++++
 test/libndctl.c                      |  84 +--
 test/multi-pmem.c                    |  23 +-
 test/parent-uuid.c                   |  13 +-
 test/pmem_namespaces.c               |  14 +-
 test/revoke-devmem.c                 |  12 +-
 util/filter.c                        |  20 +
 util/hexdump.c                       |  53 ++
 util/json.c                          |  26 +
 .gitignore                           |   5 +
 Documentation/cxl/Makefile.am        |  58 ++
 Documentation/cxl/lib/Makefile.am    |  58 ++
 README.md                            |   2 +-
 cxl/Makefile.am                      |  21 +
 cxl/lib/Makefile.am                  |  32 +
 cxl/lib/libcxl.pc.in                 |  11 +
 cxl/lib/libcxl.sym                   |  57 ++
 test/Makefile.am                     |  15 +-
 52 files changed, 2754 insertions(+), 179 deletions(-)
 create mode 100644 Documentation/cxl/cxl-list.txt
 create mode 100644 Documentation/cxl/cxl.txt
 create mode 100644 Documentation/cxl/human-option.txt
 create mode 100644 Documentation/cxl/lib/cxl_new.txt
 create mode 100644 Documentation/cxl/lib/libcxl.txt
 create mode 100644 Documentation/cxl/verbose-option.txt
 create mode 100644 cxl/lib/private.h
 create mode 100644 cxl/lib/libcxl.c
 create mode 100644 cxl/builtin.h
 create mode 100644 cxl/cxl_mem.h
 create mode 100644 cxl/libcxl.h
 create mode 100644 test/libcxl-expect.h
 create mode 100644 util/hexdump.h
 create mode 100644 cxl/cxl.c
 create mode 100644 cxl/list.c
 create mode 100644 test/libcxl.c
 create mode 100644 util/hexdump.c
 create mode 100644 Documentation/cxl/Makefile.am
 create mode 100644 Documentation/cxl/lib/Makefile.am
 create mode 100644 cxl/Makefile.am
 create mode 100644 cxl/lib/Makefile.am
 create mode 100644 cxl/lib/libcxl.pc.in
 create mode 100644 cxl/lib/libcxl.sym

-- 
2.29.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

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

end of thread, other threads:[~2021-02-23 19:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19  2:03 [ndctl PATCH v2 00/13] Initial CXL support Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 01/13] cxl: add a cxl utility and libcxl library Vishal Verma
2021-02-22 21:36   ` Ben Widawsky
2021-02-23 19:23     ` Verma, Vishal L
2021-02-19  2:03 ` [ndctl PATCH v2 02/13] cxl: add a local copy of the cxl_mem UAPI header Vishal Verma
2021-02-22 21:41   ` Ben Widawsky
2021-02-19  2:03 ` [ndctl PATCH v2 03/13] libcxl: add support for command query and submission Vishal Verma
2021-02-22 21:55   ` Ben Widawsky
2021-02-19  2:03 ` [ndctl PATCH v2 04/13] libcxl: add support for the 'Identify Device' command Vishal Verma
2021-02-22 22:02   ` Ben Widawsky
2021-02-19  2:03 ` [ndctl PATCH v2 05/13] test: rename 'ndctl_test' to 'test_ctx' Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 06/13] test: rename 'ndctl_test_*' helpers to 'test_*' Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 07/13] test: introduce a libcxl unit test Vishal Verma
2021-02-22 22:15   ` Ben Widawsky
2021-02-19  2:03 ` [ndctl PATCH v2 08/13] libcxl: add GET_HEALTH_INFO mailbox command and accessors Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 09/13] libcxl: add support for the 'GET_LSA' command Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 10/13] util/hexdump: Add a util helper to print a buffer in hex Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 11/13] test/libcxl: add a test for {set, get}_lsa commands Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 12/13] Documentation/cxl: add library API documentation Vishal Verma
2021-02-19  2:03 ` [ndctl PATCH v2 13/13] test/libcxl: introduce a command size fuzzing test Vishal Verma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).