From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Wilfred Mallawa <wilfred.mallawa@wdc.com>,
Alistair Francis <alistair.francis@wdc.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Klaus Jensen <k.jensen@samsung.com>
Subject: [PULL 2/7] spdm: add spdm storage transport virtual header
Date: Thu, 30 Oct 2025 08:29:50 +0100 [thread overview]
Message-ID: <20251030072956.1194-3-its@irrelevant.dk> (raw)
In-Reply-To: <20251030072956.1194-1-its@irrelevant.dk>
From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
This header contains the transport encoding for an SPDM message that
uses the SPDM over Storage transport as defined by the DMTF DSP0286.
Note that in the StorageSpdmTransportHeader structure, security_protocol
field is defined in the SCSI Primary Commands 5 (SPC-5) specification.
The NVMe specification also refers to the SPC-5 for this definition.
The security_protocol_specific field is defined in DSP0286 and is
referred to as SP Specific for NVMe and ATA.
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
include/system/spdm-socket.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/system/spdm-socket.h b/include/system/spdm-socket.h
index 29aa04fd5211..8c07dc12d283 100644
--- a/include/system/spdm-socket.h
+++ b/include/system/spdm-socket.h
@@ -88,6 +88,20 @@ bool spdm_socket_send(const int socket, uint32_t socket_cmd,
*/
void spdm_socket_close(const int socket, uint32_t transport_type);
+/*
+ * Defines the transport encoding for SPDM, this information shall be passed
+ * down to the SPDM server, when conforming to the SPDM over Storage standard
+ * as defined by DSP0286.
+ */
+typedef struct {
+ uint8_t security_protocol; /* Must be 0xE8 for SPDM Commands
+ as per SCSI Primary Commands 5 */
+ uint16_t security_protocol_specific; /* Bit[7:2] SPDM Operation
+ Bit[0:1] Connection ID
+ per DSP0286 1.0: Section 7.2 */
+ uint32_t length; /* Length of the SPDM Message*/
+} QEMU_PACKED StorageSpdmTransportHeader;
+
#define SPDM_SOCKET_COMMAND_NORMAL 0x0001
#define SPDM_SOCKET_STORAGE_CMD_IF_SEND 0x0002
#define SPDM_SOCKET_STORAGE_CMD_IF_RECV 0x0003
--
2.51.0
next prev parent reply other threads:[~2025-10-30 7:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 7:29 [PULL 0/7] nvme queue Klaus Jensen
2025-10-30 7:29 ` [PULL 1/7] spdm-socket: add seperate send/recv functions Klaus Jensen
2025-10-30 7:29 ` Klaus Jensen [this message]
2025-10-30 7:29 ` [PULL 3/7] hw/nvme: add NVMe Admin Security SPDM support Klaus Jensen
2025-10-30 7:29 ` [PULL 4/7] spdm: define SPDM transport enum types Klaus Jensen
2025-10-30 7:29 ` [PULL 5/7] hw/nvme: connect SPDM over NVMe Security Send/Recv Klaus Jensen
2025-10-30 7:29 ` [PULL 6/7] hw/nvme: enable ns atomic writes Klaus Jensen
2025-11-02 11:50 ` Peter Maydell
2025-11-03 12:50 ` Klaus Jensen
2025-10-30 7:29 ` [PULL 7/7] hw/nvme: add atomic boundary support Klaus Jensen
2025-11-01 8:36 ` [PULL 0/7] nvme queue Richard Henderson
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=20251030072956.1194-3-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=alistair.francis@wdc.com \
--cc=jonathan.cameron@huawei.com \
--cc=k.jensen@samsung.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--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 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).