mbox series

[ndctl,v2,0/5] cxl: firmware update support for libcxl and cxl-cli

Message ID 20230405-vv-fw_update-v2-0-a778a15e860b@intel.com
Headers show
Series cxl: firmware update support for libcxl and cxl-cli | expand

Message

Verma, Vishal L June 5, 2023, 8:21 p.m. UTC
Patch 1 is a preparatory patch that teaches memdev based commands to
filter their operand memdevs by bus. This helps restricting unit test
operations to the cxl_test bus.

Patches 2 and 3 add firmware information to the CXL memdev listing. This
is derived from the 'Get FW Info' mailbox command as well as state
information in the kernel's firmware loader mechanism in sysfs.

Patch 4 adds the libcxl APIs to perform a firmware update, and to cancel
an in-progress update, and the cxl-cli command to use these APIs to
start, wait for, and cancel firmware updates. A man page for the new
command is added as well.

Patch 5 adds a unit test to exercise all the features described above in
a cxl_test environment.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
Changes in v2:
- Add the missing Documentation/cxl/cxl-update-firmware file to the patchset
- Change &foo->bar[0] to foo->bar in a few places (Dave)
- clean up error path freeing in add_cxl_memdev_fwl() (Dave)
- Link to v1: https://lore.kernel.org/r/20230405-vv-fw_update-v1-0-722a7a5baea3@intel.com

---
Vishal Verma (5):
      cxl/memdev.c: allow filtering memdevs by bus
      cxl/list: print firmware info in memdev listings
      cxl/fw_loader: add APIs to get current state of the FW loader mechanism
      cxl: add an update-firmware command
      test/cxl-update-firmware: add a unit test for firmware update

 Documentation/cxl/cxl-disable-memdev.txt  |   2 +
 Documentation/cxl/cxl-enable-memdev.txt   |   2 +
 Documentation/cxl/cxl-free-dpa.txt        |   2 +
 Documentation/cxl/cxl-read-labels.txt     |   2 +
 Documentation/cxl/cxl-reserve-dpa.txt     |   2 +
 Documentation/cxl/cxl-set-partition.txt   |   2 +
 Documentation/cxl/cxl-update-firmware.txt |  85 +++++++++
 Documentation/cxl/cxl-write-labels.txt    |   3 +
 cxl/lib/private.h                         |  36 ++++
 cxl/lib/libcxl.c                          | 299 ++++++++++++++++++++++++++++++
 cxl/builtin.h                             |   1 +
 cxl/filter.h                              |   5 +
 cxl/libcxl.h                              |  36 ++++
 cxl/cxl.c                                 |   1 +
 cxl/filter.c                              |  19 ++
 cxl/json.c                                |  97 ++++++++++
 cxl/list.c                                |   3 +
 cxl/memdev.c                              |  77 +++++++-
 Documentation/cxl/meson.build             |   1 +
 cxl/lib/libcxl.sym                        |  10 +
 test/cxl-update-firmware.sh               | 195 +++++++++++++++++++
 test/meson.build                          |   2 +
 22 files changed, 881 insertions(+), 1 deletion(-)
---
base-commit: b830c4af984e72e5849c0705669aad2ffa19db13
change-id: 20230405-vv-fw_update-905d253fcb3b

Best regards,