From nobody Sun Sep 28 17:05:21 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=1756366062; cv=none; d=zohomail.com; s=zohoarc; b=CCn+IYV5LN2z90Ks3dtSvFkmnUFM17ukKN/0uNultmuEGSS6Zoc5ha9lkLuuuKsaizGMvA1YylmKOZ4rlZQ/HLl6+/8qKuAa2+JJmesrky2xX/ZIR6J4ZkbNs2S3coB5t5jBS0wOmVBo6EDyi9U9O8vriEyT+LaQMOuSFogR66E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756366062; 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=jNY4ncpuDcOsXQxB2Rg/MklRq+L9/xqLJrUQZb5aHUA=; b=akg6u9oiv0QFKl0WCK/hRaXYAtF7tG+kvfp/TDCdEyFtBopG99vNmemzfi7LWKCA65qIrhFookB09DqgreXQkh0s7rYSD6SJmU8N9bBrVPy1n4OgSgJw/RzLk4giXhqniiEZi6LvdnZVaYSjlGhAbj3u4aeY75OXY6XOGTZ1q2E= 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 1756366062590134.08078120694574; Thu, 28 Aug 2025 00:27:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1urX1n-0004Tk-Co; Thu, 28 Aug 2025 03:26:37 -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 1urX1P-0004H6-Pc; Thu, 28 Aug 2025 03:26:13 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1urX1N-0005NM-Pd; Thu, 28 Aug 2025 03:26:11 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-b49cf1d4f6fso505777a12.3; Thu, 28 Aug 2025 00:26:08 -0700 (PDT) Received: from fedora ([159.196.5.243]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-24884a629fcsm51009775ad.19.2025.08.28.00.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Aug 2025 00:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756365967; x=1756970767; 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=jNY4ncpuDcOsXQxB2Rg/MklRq+L9/xqLJrUQZb5aHUA=; b=Ijh5FLHNNwLJxAUuM4oIW9MU0qZWrKgnUkeKkro/zQa69flahtLAFmh2yl+OUb6o8G 3xvNTC1+mB7BbDb7vfFgc/gGM81CE1sLgBgvNJsFF6QOddu/eerjLwyCqSltQX7nziow TAcufzYTFbhrRq1Idj39IUdE/Bg4Dk/TJlw6t+Sh3zTntrppJOIDpXKclEMvDAGh+Wc4 skwAbza8FJPqSGleOyh/sXYyEiBYgSPXzVvO4SF66WM5aK6BnGaCAgIlAdf6fiYvYeUq hF+zv6OeYiWm0JTt5Ib0nBO5Up6coDgh2Oq2zm2tuthdENaipKEp0fDKUElzBtPoQnjZ 4BxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756365967; x=1756970767; 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=jNY4ncpuDcOsXQxB2Rg/MklRq+L9/xqLJrUQZb5aHUA=; b=ii+XGZihfqTnMfTucLBCgiaLOmSb+tWMjAAtBlBoOT4W1ybNgbAmExZ/tMQyxhvLUP TG5AGynpR7mMoVSJcqqy0IAQItNzEcmjYMHUQOW04l+O4YJESZlpFZnPqAbxL9B6nwTg w8Q4tH4qt5Nh5rC/Gc1lqauTfFk76DXmWaygovgNVKLJFQn7Dn6ZMKScZpttWKtbs83s YPJNAUfNRJfMDLE2dVGHLy09ggZUKLxBiSDr3rF64nl/4f34HR4XTtYqccOPHzb8N305 MQ65aZdDtlpFv0hdhDUOxoyPr3BUdGUe6X7RWjZG9xGYqIVTTuNJJTuBZftvWh3Iux4Y tA/A== X-Forwarded-Encrypted: i=1; AJvYcCUlCH+U3CWxyg8u8wFwfVzxqva1rlyjPDUHvSFJcJzYRiHHRp//t9wUHe7CpXZT/fVamYTC7o0Cb+ceFQ==@nongnu.org, AJvYcCUwQvUXMl5NKv3mrSqjRr2i6LGkhE1MM1QhSkLr9uAuaAEuWMSIQAkrVmKshjPjXjAIE/13nS82e3Pa@nongnu.org X-Gm-Message-State: AOJu0YzsiHoX3h7t/uP7D4EI1XA1c0Y5ZacdKbGG5mqiLMiTGWJf5gbf JAxNK101YD6HrsRgfQajrjQQZsCYI+2txD5ck4LIPscXhN6R8cXevgkA X-Gm-Gg: ASbGnctVR+Yc/VW49TdtrOogfg4EiHkdRdD0yVtpVpe2eHjxVSqXbOQDK/G8+xhz0o9 exxjZx1L+81v9JvC5J1P/140hV/HjfczCO+lZcTmoaCvfwif/381pAWnveozo+AlW5Z0TJAtjHB TMQNWgc4fK1w/CrWC4QVz9RgQ1ec89yXyzdBrT1iPulZmLqXJiII1dmejvfqxcxMcL8/6C/MrU6 RoilUJGq8kbuG4V2QaQfpgoaAyCWLnb2xwnIH83rZqdKQ2HYAGzigULz1adKmkn6phaptP0fYs7 5/X4lSXuNQIFEwnBhM6HJpUG7FMcTMmCBcHr2np91DPTW78iG4Iwx9gm9y8cu9yUFbQALEGLc/Z 5m7MFtx2ARN8s4ZKjqje7dLZKi6CzSbpcNtOwLJdoFH0u0oY= X-Google-Smtp-Source: AGHT+IHBYzMaGkOIL1ZjpUwqP29SLBrEi72rPjKWtHFnO0b0N9aYCtkoSbG6yWqlCKxdx0ngb7Dwqg== X-Received: by 2002:a17:902:f70c:b0:246:a165:87c7 with SMTP id d9443c01a7336-246a1658a38mr223930275ad.42.1756365967215; Thu, 28 Aug 2025 00:26:07 -0700 (PDT) From: Wilfred Mallawa To: Alistair Francis Cc: 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 , qemu-devel@nongnu.org, qemu-block@nongnu.org, Jonathan Cameron , Wilfred Mallawa Subject: [PATCH v2 2/5] spdm: add spdm storage transport virtual header Date: Thu, 28 Aug 2025 17:25:30 +1000 Message-ID: <20250828072532.425592-4-wilfred.opensource@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250828072532.425592-2-wilfred.opensource@gmail.com> References: <20250828072532.425592-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::533; envelope-from=wilfred.opensource@gmail.com; helo=mail-pg1-x533.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: 1756366064221124100 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 2b7d03f82d..6c2cb7b926 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