From nobody Sun Sep 28 17:03:47 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1757392512; cv=none; d=zohomail.com; s=zohoarc; b=P5GcXZnzgeKdaP2C2cKmd6ZbqQlgsa76l7qIeAW0qv5QCIFOoxvNwSodz2hDmrcoefRfXeAFGzicNSBAmQKIS5CQwuozdw9HM9h2pJXRT6oPImkeNwJWeCDd8xUlVTcSgIxo+CSylCJkj+MyheEYlqyBTWgCyKSZO1SBZneOU9E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757392512; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7RCukcbGa6ijcHuk+daD95SFwDIqdnmVomZ8mMo0axk=; b=aIybBRVdRS4PFlrgpsQXdl7GtXbhaY+na83Zo39HQAeK0CzPD5ro/KVgnhc4vfwwzBYzwPWL5djORLqNW8EoXGWKmLHkR+hAbqhflq/6udhNHpIg5Y4hGG496QbQ+IR6FtbnHH+ZXAP5m94TjPr+YhS2O2lji7wYy9lT9jlqx9c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1757392512447430.6342749160108; Mon, 8 Sep 2025 21:35:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uvq3h-0006HC-E2; Tue, 09 Sep 2025 00:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uvq3d-0006GR-UJ; Tue, 09 Sep 2025 00:34:17 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uvq3X-0003Ee-3N; Tue, 09 Sep 2025 00:34:17 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-7741991159bso4543417b3a.0; Mon, 08 Sep 2025 21:34:10 -0700 (PDT) Received: from fedora ([159.196.5.243]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-774661247cdsm606534b3a.33.2025.09.08.21.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Sep 2025 21:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757392448; x=1757997248; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7RCukcbGa6ijcHuk+daD95SFwDIqdnmVomZ8mMo0axk=; b=BPACv1ddA5y6ZJpyq8na2sp0wEq1RQs8WkB5T0bQQkjHDTizaKkF9F4BfYACdWplJ1 1xbrlQl/Bh3EiOvLi/MoTR7jPC0W9INVGCnGayMOCgGswOudd/WFeasGkGl9RQg8odMf on2eAAAiZ1BzeFQE2FzsYrBbB57HALOTTJ+00+DXso6t70gT7r4sCKXGcaOpNJVTdAZV Tl3MEMEe1tBKCIayP/OERKi2fbR7NO59ycoFbqDQ7LIb16G6ZoXRizXOKilBnUT4A8wv HU6M+ben95BJuz9Rf/i6rb4qK4ODSEPBZM8AmdPsjgXKYRu0WY3vHswWhadEoTyliiK8 P3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757392448; x=1757997248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7RCukcbGa6ijcHuk+daD95SFwDIqdnmVomZ8mMo0axk=; b=uCzowRiP8sH2pX2CuEaojnPKm9eOQT9IFN+OWDFFeTFoutO8t8E4I6gtOA0tZsGLi/ S6xJaIPF1GeRuONqRntevVbe4eDyy8TfqjZbiNdVHbiYdi+eFoQdOqQgN5m7GwQnTT7W EbqNChjYdkWRg1BCXf8uZ5pE0U8csZHGJVed6b62FDqIm+39RBV252igopl1+2Mw0lgN 5L19jxizxQ5QL7Gg+54O4mXN2uEGE+W8o8Tttprc7nyHI/gemOGZJjiKFMc35HLcV3sb EQAqAzT7r6r3SLQwrt28nOIivowbNhriv41xutTdcMJD8IHVwAk5itD7F62/n88W8SgX aEoA== X-Forwarded-Encrypted: i=1; AJvYcCXRZEbCilcIECLF01R5XbENYvFMzjVPE/waKCBMhDfm2Vzw5zSE/4Y/t28MIgv40hdHZ+3P0DRElZ62@nongnu.org X-Gm-Message-State: AOJu0Yxpb04KRAVTt/tNginprfqwQDsv2On3Oufe9dTQVEt2Cdajr4jL rZPNCg6Sg6yDuDDBYUTIHgRejoYpAfcuWWVaq/6U8r6gGTGMQC/w+mha X-Gm-Gg: ASbGncuKQP9aHj8QQe5UwudohhXKm4AcYv15LojNdH7P1yerdxi9RRJQagd3NtaMfc+ rwFHfmgAEAXowvshGD4ahUWkCoAii4FLDJ/aztThnBzCWav8GrE2uJqZVqo+CwQoyMritxQKr3O Jz84TEq4iBkd5SAjRHKkupuQ9YWLB06mGyp5oDIbaCONsBrN81ec35SoGDFvQjCKI21s8+BTTJO WfavIzGVl1bmIfyYQbaU6PO6iDiZPNN8qlC80FfuL2XIeaFCQcFIzL9CLlP7ZulFUxTZyGVHuJC umVDdvdSBWUs+jmnUQ1+n4gctZQ4DkPbZj5O2C1X2mzAXRfXsLydX1W2t6/F+b3Z7B7NmwY/Hmx ZfgITstiWJrN42gzQ4/uZY8qkPETg1163VxKR+YPh9g== X-Google-Smtp-Source: AGHT+IE/mFdJf6KWeDFqKhSRKNLktZ5BvviL5gE6yDHp7B9PO945Fqqa7D3jJ90I/o01YsoH1u93kA== X-Received: by 2002:a05:6a20:4321:b0:24f:4c12:5fa5 with SMTP id adf61e73a8af0-25345578e96mr15885205637.42.1757392448255; Mon, 08 Sep 2025 21:34:08 -0700 (PDT) From: Wilfred Mallawa To: Alistair Francis , Keith Busch , Klaus Jensen , Jesper Devantier , Stefan Hajnoczi , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kevin Wolf , Hanna Reitz , "Michael S . Tsirkin" , Marcel Apfelbaum Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Jonathan Cameron , Wilfred Mallawa Subject: [PATCH v5 2/5] spdm: add spdm storage transport virtual header Date: Tue, 9 Sep 2025 14:32:57 +1000 Message-ID: <20250909043259.93140-4-wilfred.opensource@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250909043259.93140-2-wilfred.opensource@gmail.com> References: <20250909043259.93140-2-wilfred.opensource@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=wilfred.opensource@gmail.com; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1757392513667124100 Content-Type: text/plain; charset="utf-8" From: Wilfred Mallawa This header contains the transport encoding for an SPDM message that uses the SPDM over Storage transport as defined by the DMTF DSP0286. Signed-off-by: Wilfred Mallawa --- include/system/spdm-socket.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/system/spdm-socket.h b/include/system/spdm-socket.h index 29aa04fd52..c5f9f3611c 100644 --- a/include/system/spdm-socket.h +++ b/include/system/spdm-socket.h @@ -88,6 +88,18 @@ bool spdm_socket_send(const int socket, uint32_t socket_= cmd, */ void spdm_socket_close(const int socket, uint32_t transport_type); =20 +/** + * Defines the transport encoding for SPDM, this information shall be pass= ed + * down to the SPDM server, when conforming to the SPDM over Storage stand= ard + * as defined by DSP0286. + */ +typedef struct { + uint8_t security_protocol; /* Must be 0xE8 for SPDM Comma= nds */ + uint16_t security_protocol_specific; /* Bit[7:2] SPDM Operation + Bit[0:1] Connection ID */ + 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 --=20 2.51.0