From: Vishal Verma <vishal.l.verma@intel.com>
To: <linux-cxl@vger.kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
Ben Widawsky <ben.widawsky@intel.com>, <nvdimm@lists.linux.dev>,
Vishal Verma <vishal.l.verma@intel.com>
Subject: [ndctl PATCH v4 00/17] Initial CXL support
Date: Thu, 7 Oct 2021 02:21:22 -0600 [thread overview]
Message-ID: <20211007082139.3088615-1-vishal.l.verma@intel.com> (raw)
Changes since v3[1]:
- Collect review tags
- Add the kernel's struct_size() helper for trailing array struct
calculations (Dan)
- Drop test/libcxl - to be re-added after switching to an in-kernel
emulation/unit test regime 'cxl_test', similar to 'nfit_test' (Dan)
- Rename some verb_X_verb instances to drop the double verb (Dan)
- Rename '{get,set}_lsa' to '{read,write}_labels' in libcxl APIs (Dan)
- Add accessor APIs for health flags instead of leaking binary
representations to library users (Dan)
- Rename '{get,set,zero}_lsa' APIs to '{read,write,zero}_label' (Dan)
- Add health info to cxl-list
- Fix a bug where a newly minted cmd struct didn't have a non-zero status
(This allowed a flow like cxl_cmd_new_<foo> followed by
cxl_cmd_<foo>_get_<field>() to silently succeed, where the second
accessor call should've failed because cxl_cmd_submit was omitted.
- Change the cxl_cmd_read_label_get_payload() API to refrain from simply
returning a void pointer, that is easy to access out of bounds. Instead,
expect a buf/len pair that libcxl then copies the payload into (Dan)
[1]: https://lore.kernel.org/linux-cxl/a86b057ccdd8e0a087d300dfc7dc315a3bf32e95.camel@intel.com/
---
These patches 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.
These patches include:
- libcxl representation of cxl_mem devices
- A command submission harness through libcxl
- A 'cxl-list' command which displays information about a device
- cxl-{read,write,zero}-labels commands for Label Storage Area
manipulation
An ndctl branch with these patches is also available at [2]
[2]: https://github.com/pmem/ndctl/tree/cxl-2.0v4
Ira Weiny (1):
ndctl: Add CXL packages to the RPM spec
Vishal Verma (16):
ndctl: add .clang-format
cxl: add a cxl utility and libcxl library
cxl: add a local copy of the cxl_mem UAPI header
util: add the struct_size() helper from the kernel
libcxl: add support for command query and submission
libcxl: add support for the 'Identify Device' command
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
libcxl: add label_size to cxl_memdev, and an API to retrieve it
libcxl: add a stub interface to determine whether a memdev is active
libcxl: add interfaces for label operations
cxl: add commands to read, write, and zero labels
Documentation/cxl: add library API documentation
cxl-cli: add bash completion
cxl: add health information to cxl-list
Documentation/cxl/cxl-list.txt | 68 ++
Documentation/cxl/cxl-read-labels.txt | 33 +
Documentation/cxl/cxl-write-labels.txt | 32 +
Documentation/cxl/cxl-zero-labels.txt | 29 +
Documentation/cxl/cxl.txt | 34 +
Documentation/cxl/human-option.txt | 8 +
Documentation/cxl/labels-description.txt | 8 +
Documentation/cxl/labels-options.txt | 17 +
Documentation/cxl/lib/cxl_new.txt | 43 +
Documentation/cxl/lib/libcxl.txt | 56 +
Documentation/cxl/memdev-option.txt | 4 +
Documentation/cxl/verbose-option.txt | 5 +
configure.ac | 4 +
Makefile.am | 14 +-
Makefile.am.in | 5 +
cxl/lib/private.h | 140 +++
cxl/lib/libcxl.c | 1265 ++++++++++++++++++++++
cxl/builtin.h | 13 +
cxl/cxl_mem.h | 189 ++++
cxl/libcxl.h | 116 ++
util/bitmap.h | 23 +
util/filter.h | 2 +
util/hexdump.h | 8 +
util/json.h | 4 +
util/main.h | 3 +
util/size.h | 62 ++
util/util.h | 6 +
cxl/cxl.c | 99 ++
cxl/list.c | 118 ++
cxl/memdev.c | 314 ++++++
util/filter.c | 20 +
util/hexdump.c | 53 +
util/json.c | 215 ++++
.clang-format | 162 +++
.gitignore | 7 +-
Documentation/cxl/Makefile.am | 61 ++
Documentation/cxl/lib/Makefile.am | 58 +
contrib/ndctl | 109 ++
cxl/Makefile.am | 22 +
cxl/lib/Makefile.am | 32 +
cxl/lib/libcxl.pc.in | 11 +
cxl/lib/libcxl.sym | 87 ++
ndctl.spec.in | 49 +
43 files changed, 3604 insertions(+), 4 deletions(-)
create mode 100644 Documentation/cxl/cxl-list.txt
create mode 100644 Documentation/cxl/cxl-read-labels.txt
create mode 100644 Documentation/cxl/cxl-write-labels.txt
create mode 100644 Documentation/cxl/cxl-zero-labels.txt
create mode 100644 Documentation/cxl/cxl.txt
create mode 100644 Documentation/cxl/human-option.txt
create mode 100644 Documentation/cxl/labels-description.txt
create mode 100644 Documentation/cxl/labels-options.txt
create mode 100644 Documentation/cxl/lib/cxl_new.txt
create mode 100644 Documentation/cxl/lib/libcxl.txt
create mode 100644 Documentation/cxl/memdev-option.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 util/hexdump.h
create mode 100644 cxl/cxl.c
create mode 100644 cxl/list.c
create mode 100644 cxl/memdev.c
create mode 100644 util/hexdump.c
create mode 100644 .clang-format
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
base-commit: 4e646fa490ba4b782afa188dd8818b94c419924e
--
2.31.1
next reply other threads:[~2021-10-07 8:21 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 8:21 Vishal Verma [this message]
2021-10-07 8:21 ` [ndctl PATCH v4 01/17] ndctl: add .clang-format Vishal Verma
2021-10-07 8:21 ` [ndctl PATCH v4 02/17] cxl: add a cxl utility and libcxl library Vishal Verma
2021-10-07 8:21 ` [ndctl PATCH v4 03/17] cxl: add a local copy of the cxl_mem UAPI header Vishal Verma
2021-10-07 8:21 ` [ndctl PATCH v4 04/17] util: add the struct_size() helper from the kernel Vishal Verma
2021-10-14 2:40 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 05/17] libcxl: add support for command query and submission Vishal Verma
2021-10-14 2:53 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 06/17] libcxl: add support for the 'Identify Device' command Vishal Verma
2021-10-07 8:21 ` [ndctl PATCH v4 07/17] libcxl: add GET_HEALTH_INFO mailbox command and accessors Vishal Verma
2021-10-14 16:01 ` Dan Williams
2021-11-02 20:22 ` Verma, Vishal L
2021-11-02 20:27 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 08/17] libcxl: add support for the 'GET_LSA' command Vishal Verma
2021-10-14 16:35 ` Dan Williams
2021-10-14 20:06 ` Verma, Vishal L
2021-10-14 20:55 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 09/17] util/hexdump: Add a util helper to print a buffer in hex Vishal Verma
2021-10-14 16:48 ` Dan Williams
2021-10-14 20:33 ` Verma, Vishal L
2021-10-14 22:39 ` Dan Williams
2021-11-02 20:25 ` Verma, Vishal L
2021-10-07 8:21 ` [ndctl PATCH v4 10/17] libcxl: add label_size to cxl_memdev, and an API to retrieve it Vishal Verma
2021-10-14 18:24 ` Dan Williams
2021-10-14 21:50 ` Verma, Vishal L
2021-10-07 8:21 ` [ndctl PATCH v4 11/17] libcxl: add a stub interface to determine whether a memdev is active Vishal Verma
2021-10-14 19:59 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 12/17] libcxl: add interfaces for label operations Vishal Verma
2021-10-14 21:27 ` Dan Williams
2021-10-14 22:18 ` Verma, Vishal L
2021-10-14 22:24 ` Verma, Vishal L
2021-10-14 22:45 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 13/17] cxl: add commands to read, write, and zero labels Vishal Verma
2021-10-14 22:34 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 14/17] Documentation/cxl: add library API documentation Vishal Verma
2021-10-14 23:31 ` Dan Williams
2021-11-05 18:58 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 15/17] ndctl: Add CXL packages to the RPM spec Vishal Verma
2021-10-14 23:33 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 16/17] cxl-cli: add bash completion Vishal Verma
2021-10-14 23:34 ` Dan Williams
2021-10-07 8:21 ` [ndctl PATCH v4 17/17] cxl: add health information to cxl-list Vishal Verma
2021-10-11 22:07 ` Verma, Vishal L
2021-10-15 0:09 ` Dan Williams
2021-10-14 23:42 ` Verma, Vishal L
2021-10-15 21:15 ` Dan Williams
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=20211007082139.3088615-1-vishal.l.verma@intel.com \
--to=vishal.l.verma@intel.com \
--cc=ben.widawsky@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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.