From: Wilfred Mallawa <wilfred.opensource@gmail.com>
To: Alistair Francis <alistair.francis@wdc.com>
Cc: "Keith Busch" <kbusch@kernel.org>,
"Klaus Jensen" <its@irrelevant.dk>,
"Jesper Devantier" <foss@defmacro.it>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Fam Zheng" <fam@euphon.net>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org, dlemoal@kernel.org,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Wilfred Mallawa" <wilfred.mallawa@wdc.com>
Subject: [PATCH v4 0/5] NVMe: Add SPDM over the storage transport support
Date: Thu, 4 Sep 2025 13:10:54 +1000 [thread overview]
Message-ID: <20250904031058.367667-2-wilfred.opensource@gmail.com> (raw)
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
This series extends the existing SPDM support in QEMU to support the DSP0286
SPDM Storage Transport [1] for NVMe. SPDM Storage Transport uses the NVMe
Admin Security Send/Receive commands, as such, support for these commands have
also been added.
With the addition of a new `spdm-trans` CLI argument for NVMe controllers,
users can specify `spdm_trans=nvme` or `spdm_trans=doe`. This allows for the
selection of the SPDM transport. The `doe` option is the current default,
`nvme` would select SPDM Storage Transport for the controller, where SPDM
communication happens over the NVMe Admin Security Send/Receive commands.
Support for DSP0286 already exists in `libspdm` [2] and support for the QEMU
SPDM server is being upstreamed for `spdm-utils` [3]. This series was tested by
using `spdm-utils` as the qemu SPDM server with SPDM Storage Transport support
built with `libspdm` v3.8.0, and `spdm-utils` also as the SPDM requester.
Changes V1 -> V2:
- spdm_socket_rsp() now uses the new spdm_socket_send/receive()
functions. spdm_socket_command_valid() is added to parse the
command value incase some bytes were received (result = true) but
with an invalid command.
- Added inline comments to describe fields of
StorageSpdmTransportHeader. Checkpatch generates warnings, but lots of
existing code does this. The QEMU_PACKED attribute now follows the
StorageSpdmTransportHeader struct definition.
- Use extract32() instead of manual shifting/masking in
nvme_sec_prot_spdm_send/recv().
- Use g_autofree for send/recv buffer allocation
in nvme_sec_prot_spdm_send/recv().
- Added explicit fallthrough comment for checking `secp` in
nvme_security_receive()
- Added enum support for SPDM transport type, such that a user defined
transport type string, can be mapped to the respective enum for
internal use.
Changes V2 -> V3:
- Fixed up the incorrect use of `NVME_NO_COMPLETE` to more appropriate
NVMe error codes in Patch [3/5]. Note that DSP0286 does not define
error codes for transport level failures.
- Removed NULL check for g_malloc0(). Should abort instead.
Changes V3 -> V4:
- Added integer overflow and MDTS checking for spdm_sends
- Use g_try_malloc0() over g_malloc0()
- Fixed up endian conversion for command status received from
the server.
- Added check to only accept SPDM send/receive if the socket
has been setup.
- Only show SPDM as a supported protocol if the socket
has been setup.
Wilfred Mallawa (5):
spdm-socket: add seperate send/recv functions
spdm: add spdm storage transport virtual header
hw/nvme: add NVMe Admin Security SPDM support
spdm: define SPDM transport enum types
hw/nvme: connect SPDM over NVMe Security Send/Recv
backends/spdm-socket.c | 79 +++++++++--
docs/specs/spdm.rst | 10 +-
hw/nvme/ctrl.c | 258 +++++++++++++++++++++++++++++++++--
hw/nvme/nvme.h | 5 +
include/block/nvme.h | 15 ++
include/hw/pci/pci_device.h | 2 +
include/system/spdm-socket.h | 66 ++++++++-
7 files changed, 407 insertions(+), 28 deletions(-)
--
2.51.0
next reply other threads:[~2025-09-04 3:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 3:10 Wilfred Mallawa [this message]
2025-09-04 3:10 ` [PATCH v4 1/5] spdm-socket: add seperate send/recv functions Wilfred Mallawa
2025-09-04 10:10 ` Jonathan Cameron via
2025-09-09 0:41 ` Wilfred Mallawa
2025-09-04 3:10 ` [PATCH v4 2/5] spdm: add spdm storage transport virtual header Wilfred Mallawa
2025-09-04 3:10 ` [PATCH v4 3/5] hw/nvme: add NVMe Admin Security SPDM support Wilfred Mallawa
2025-09-04 10:22 ` Jonathan Cameron via
2025-09-09 1:16 ` Wilfred Mallawa
2025-09-04 19:47 ` Stefan Hajnoczi
2025-09-04 19:50 ` Stefan Hajnoczi
2025-09-09 4:31 ` Wilfred Mallawa
2025-09-04 3:10 ` [PATCH v4 4/5] spdm: define SPDM transport enum types Wilfred Mallawa
2025-09-04 10:24 ` Jonathan Cameron via
2025-09-04 3:10 ` [PATCH v4 5/5] hw/nvme: connect SPDM over NVMe Security Send/Recv Wilfred Mallawa
2025-09-04 10:31 ` Jonathan Cameron via
2025-09-09 1:38 ` Wilfred Mallawa
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=20250904031058.367667-2-wilfred.opensource@gmail.com \
--to=wilfred.opensource@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alistair.francis@wdc.com \
--cc=dlemoal@kernel.org \
--cc=fam@euphon.net \
--cc=foss@defmacro.it \
--cc=hreitz@redhat.com \
--cc=its@irrelevant.dk \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wilfred.mallawa@wdc.com \
/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.