From patchwork Wed May 1 08:52:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 13650344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88394C10F1A for ; Wed, 1 May 2024 09:06:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20E706B00AE; Wed, 1 May 2024 05:06:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BE0D6B00AF; Wed, 1 May 2024 05:06:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 00F7B6B00B0; Wed, 1 May 2024 05:06:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D6A036B00AE for ; Wed, 1 May 2024 05:06:41 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 93301C076E for ; Wed, 1 May 2024 09:06:41 +0000 (UTC) X-FDA: 82069246602.11.5EF7E82 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2071.outbound.protection.outlook.com [40.107.94.71]) by imf28.hostedemail.com (Postfix) with ESMTP id 8C276C002C for ; Wed, 1 May 2024 09:06:38 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=ZWfrqQot; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.71 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714554398; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BrLx/Gtif4PESh/Cb7f+ZeKvu4HjLI75t/BpaHSyZ/E=; b=fNObwV8zaMZhiZ4yMSZBDeDcg1cZuExC3W7KPSfcOBeFgRxmFiIlYcfSCM0Ug2uQiQn0jv g/6dcmhnc1QrakXcgbn/+Zm4ZBtrwvndqz81p5AFXz8FexvVUK3ToBMaKL94J0c2HG5X15 YV9GQcU34oeHHBaU39eunB58aRbM80s= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=ZWfrqQot; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of Michael.Roth@amd.com designates 40.107.94.71 as permitted sender) smtp.mailfrom=Michael.Roth@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1714554398; a=rsa-sha256; cv=pass; b=skMgxCkwG8hRS4aNHtkEunZVkyUKL3pqG99z1Va4UGizvkrw6+GfmMZQXlqrRadSTZLZqM WaJsRqZtlltjVwU06hERHie5F4fmjIIy2OvAfAsqbhvlL9QPVLARm/XeBL0AdDRUb+CWB4 5LkpcEiYn6oMVeRDAFNGMouipcxNBEg= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BoWItKzLSyXRbwSn9BAiAEdWY8VnHj8eR8uQo7ooP8lSWu8mGSi5ELVCvem00+n70P4yZgP00crHTmzmSZrjAtpXbZbR6X2ch0iX20pMQ+q6PxNeaO74CMy0kwwuvsqC+Jq1OfrjiL+BZMjXrzLik73l1PNf3Eirud7QpmNRbzM9dAmodpfW9b8ji3/ZgFDuhKGKwRGE3+Gqox4qu3axqepEUdKw7Pfycd0nbI/dCIa0lqCMHyrE/gOv73IxYmfzy/P31Hglat81mG3aHDmwjNk8EOJ5dcHSuSlbcrsgEDkxWe7xT+J1tQyzqtvbDimpz/7sPwDgyl9TtX5CGIajcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BrLx/Gtif4PESh/Cb7f+ZeKvu4HjLI75t/BpaHSyZ/E=; b=QKvhXVUuWykmPTBrORprW6uUWNpuOHQrXqxHq3FshKWIMvaqHDihwREPAqM+HQVAjDdc7hQqqZek8/+t7HKiHvdv1dI/N9z2vlM8HRmOqyGrjbxn/rtojh/2GgP9ECSx7chGtVedvJ7xvgDcA5ro3A2qY/C/XdjwnL0zpfpscFSYY3398k+GmKbPkPOZjaDE2Khf93ATNkprMWGE7M0K5PQy5ISONCbTB0jM4yV3TxU6nC3C3YjO0ScgDgMO4WkzYtZXkSWD5VGWZahuNXUK/aCT4fRWYSYt7ufPeESc3TAGrYMn159bcsvJwmDOlVwP034uQ/GBxLuMRO6rScF7ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BrLx/Gtif4PESh/Cb7f+ZeKvu4HjLI75t/BpaHSyZ/E=; b=ZWfrqQotR8K7QKALU4IPm20pAJNXmSBYY+PZZJrAFA5JgG1ISmG+ms/QxeyxI5617sV2Jw4z13bah2LldhmdlgGyVdmVlhTfBY3zhvQZRALCIoPQtni2KAZGXbwcBuiq8JJyhYuQgNoPFo+xaVrySNW2XTPqGSn6yXXq+IfkeEo= Received: from BN9PR03CA0663.namprd03.prod.outlook.com (2603:10b6:408:10e::8) by PH7PR12MB6419.namprd12.prod.outlook.com (2603:10b6:510:1fd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Wed, 1 May 2024 09:06:32 +0000 Received: from BN2PEPF0000449D.namprd02.prod.outlook.com (2603:10b6:408:10e:cafe::e8) by BN9PR03CA0663.outlook.office365.com (2603:10b6:408:10e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.27 via Frontend Transport; Wed, 1 May 2024 09:06:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF0000449D.mail.protection.outlook.com (10.167.243.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Wed, 1 May 2024 09:06:32 +0000 Received: from localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 1 May 2024 04:06:31 -0500 From: Michael Roth To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v15 20/20] crypto: ccp: Add the SNP_VLEK_LOAD command Date: Wed, 1 May 2024 03:52:10 -0500 Message-ID: <20240501085210.2213060-21-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240501085210.2213060-1-michael.roth@amd.com> References: <20240501085210.2213060-1-michael.roth@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF0000449D:EE_|PH7PR12MB6419:EE_ X-MS-Office365-Filtering-Correlation-Id: 27418ea7-e4c0-4af4-7100-08dc69bdfee3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400014|376005|1800799015|7416005|36860700004; X-Microsoft-Antispam-Message-Info: AhLvACFJpGWAOMl2/I3fX8Pl48bF2v3L7Vb2lGg+0Qex0iMDTRgWOjPaXmiLZXRtBlKx5NVYpYaDpWpfjt2AuggQoUWlijxjoih5R6YDZmpcf5DOXmF6qhuOhDm1IQsm3QagDUbPUoxInX3ubvaqT972vWj5rZmmsSZQtTph0w30m8slbI4wekK9YSsVqH/MhWnbBWwA2ZZJMB0XxeKV17gjegh0IvLVdequM5Mv6W0fk2PsKe+FBGZlvA0uLheg1PYwDH41pSkA0oaQdN/cdH/+87cDFyxBiDQ0vYxRy6PIQRs9Z2Cwv5e9qHUOCRFnDQkbpPOxhVbekhzQKDhaCbS49fOerh6j+2sOdDIFy1crpPL4f1WP9TolA0P06B4FwftD1A1LdudJItYqMG4jph6CWsGf5mOb5T1fCQzcwpJK3HiQ1I2alCL/6uvVKLuWIdoNfrQ4aYXY+bQfKzGs/NCuAiSJ82tPjJrFHtoRRjJ4kUhfX8dh3Y5NqUElALhdxpaiWAsaNfZgePWFB1eWIMuwveiaNAppf2XRozjw4KsoIcW4S7LV6oEgiEibiyIeGVI3gGelusEs1dxY1+n9xWxHSgLcalOcaXgLigXhCiUjeZJQHEqsYKJHF5ENYLz4tUkikoqjUTYuhNlO9JcuFyrNBMOLKgGEICuQI76LzOXPggG3ffWPC4vltEhJZtanbn8BTmdLspsYY9A3Ei7p6R7loKbESbJW0a2LqbC7pynhlXTJmqUPk/o8ARgXIpFe4kqy+7f1GgCVxu/CD9E4+bkVRb9Lf2/5kwDkAEnHyLy+ilLJi4++QiDVKKJ53ffOxd9/97aPdfj9S3eNabvckgQEyMIEOAC/vwHDiuD2pEoGxU67coxi/CvZAu8QDVBzbLsJAa0SRjchSoxaVAeZXdBddRDypEvIiM6YY6LeB5bBxGWwkLpyPom746LvSauDw7Y4/1t6k80khbwHyBn9mZtvlXWHpac9P3Z/8lulbAwK34stayryaNppqX8ym53+hUxi1jrL0tH5h6N+Nf9vUKqKjk825M7eyw5FakagEowBnrwgztAI6hMMiPUivtKynZe8v/wnLbqTa0XvaTm/dGtVUk+AyDS/0B2tIs9hkJDw4gZkyDYNMPLxf5GoptoA6vkJyOdrJR+mtqaqHak8rl1KC/oGRCEGN4uYivAqGpEIikTGfZ5GbNKdWFWwy9rzeFAkMQUr+3gJXWXmJZBeOXsTtt2SzJQwPVElNUswSMURI9gmUqKvmMFdAU0a8Swm316mUZg9dPlzgDYyrrR4jhuBGVLoQL+tqZiZhk56TbOQvzs6fGTZQAFmWQ2zyu7Y6akOkPEpdIxyL5jsEMO4Ozhu/g4u2kBRTD9ewg8F76Jeg5yzIwpyjrm+ySnD5jgy X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400014)(376005)(1800799015)(7416005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 09:06:32.5196 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27418ea7-e4c0-4af4-7100-08dc69bdfee3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF0000449D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6419 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8C276C002C X-Stat-Signature: e6m5oj44zq4edhpdgkbgexcj6qhmyb6e X-Rspam-User: X-HE-Tag: 1714554398-720551 X-HE-Meta: U2FsdGVkX1/Tcd4dkMFuoYiGiRAcRKpxZkMOP0RUc7MfurPgCOUCy+6pH3Uhsri0zIfVQZOHRzSAy+GAWURyA8OZSLQpAb0VoxQn3iiFTD73M2jLspiNCERfGcClXxuTftCNAwdwGCI1TEx5eYwHQcLlXNNpaRIWMpqVdtt4ObVLXUZzd3SMmwInJCTmbsG98Hr1mzRnK3q54L3BL7ZS8yiIlHMZ7GFlFaQ1wRUshdwQ/PJlg5N/mIHDixPZXqb0P8ObpMxdc2XVjUYKL7TdR7sYFZqZzAa/SdrzQkYTU5CshDrVe0Up7sw4IinVc3qDIrFh9fl4cV2Aa3rfPvrRdUUlrnEjiv6/ogiFADDuQlFGhkCd4oXcAJD/YIVfveuZLHr1QeXfgcDssUdZ1wxGEkDt1Og6LKjOJDWqTfKnTtpDxGjhwyx8ANKU4+xCOMqyDiSYIkY7Z80kGQHURKhzuq++Y2JbkxvjYq8uXIIkeqbn4VxfQH4LCYn/AaQEtaSRM6NBF8cUU8W00b69RUEHus9ZjRWmwgRlx9qCw9WBPjKUdLBWpBaEzqg0T6a2zgBrMnFQciDC1XbXn/iEBKTSQXx4Uv3nMk2UyADmySQ7ZSl3V2OtF1YD14cQScZuIAFPQidMzJoY5IbyJjBbhd3eI1DMY4Jr3G6okVKf3bNTL26cEUmB/K92nDwRIA+twLrZQ77SoEjY4zfrIBPNFJhrjQlQsGnzanTg2pLfX+qx3QEvfrEGA0ONJNnYAdeLpbYX0dFgyDtU0MgNyfIyrx0YyIwZACFhiZBvh/VmubhJpYwFgCELwBdn2RWTNZXIh2ugaV7JKNw1dRCKZEDBucNy5a/85WD4k8g8/nhDeNl3BCIHueDHdm3182ASpuWzSvxRlLV2rJ4MwIgV0HmrjEzEBX7hM98ilDRgJXWlKVz6+hGAtENpv8yh3dw/HD4iq7+B7YHJCw1/ccQeluhX55S Sz43XIs1 rM/1ZqLwuSDyUGaNESetTQynYLiKbdPphZumtJcswlTudAlVYoLzVEcY3hLI/3LZuXASLmrjxXfXk9/CWFYBb8RQnpdUgM5jk77Es1U63Dri4yWPQFgWSpp8VG1nBKfJpWFrmvOr2hr546gn1j2HGst0CaU+IR8Ioxsmi97xhzoHwMM0j5pN4R9JwVClrVBDBPALd1f4nGkR0l9YfQ+H5EL4ZCkaP90neZDi1TWRIrgUfbg0Xahw3s5T/iQVG/I1Ah/b7CtjF3uDklsuOCkWTYsCljcxUsezcRYa64BACrGQRJMsM7AwutSzkrdSOVshCMQ0NheOq0oCFVdygFKwyiKTsQR0GHVBTlNB5R9SYPuxA5XHlw2rAsKhdnwuOWBkIAoYw X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: When requesting an attestation report a guest is able to specify whether it wants SNP firmware to sign the report using either a Versioned Chip Endorsement Key (VCEK), which is derived from chip-unique secrets, or a Versioned Loaded Endorsement Key (VLEK) which is obtained from an AMD Key Derivation Service (KDS) and derived from seeds allocated to enrolled cloud service providers (CSPs). For VLEK keys, an SNP_VLEK_LOAD SNP firmware command is used to load them into the system after obtaining them from the KDS. Add a corresponding userspace interface so to allow the loading of VLEK keys into the system. See SEV-SNP Firmware ABI 1.54, SNP_VLEK_LOAD for more details. Reviewed-by: Tom Lendacky Signed-off-by: Michael Roth --- Documentation/virt/coco/sev-guest.rst | 19 ++++++++++++++ drivers/crypto/ccp/sev-dev.c | 36 +++++++++++++++++++++++++++ include/uapi/linux/psp-sev.h | 27 ++++++++++++++++++++ 3 files changed, 82 insertions(+) diff --git a/Documentation/virt/coco/sev-guest.rst b/Documentation/virt/coco/sev-guest.rst index e1eaf6a830ce..de68d3a4b540 100644 --- a/Documentation/virt/coco/sev-guest.rst +++ b/Documentation/virt/coco/sev-guest.rst @@ -176,6 +176,25 @@ to SNP_CONFIG command defined in the SEV-SNP spec. The current values of the firmware parameters affected by this command can be queried via SNP_PLATFORM_STATUS. +2.7 SNP_VLEK_LOAD +----------------- +:Technology: sev-snp +:Type: hypervisor ioctl cmd +:Parameters (in): struct sev_user_data_snp_vlek_load +:Returns (out): 0 on success, -negative on error + +When requesting an attestation report a guest is able to specify whether +it wants SNP firmware to sign the report using either a Versioned Chip +Endorsement Key (VCEK), which is derived from chip-unique secrets, or a +Versioned Loaded Endorsement Key (VLEK) which is obtained from an AMD +Key Derivation Service (KDS) and derived from seeds allocated to +enrolled cloud service providers. + +In the case of VLEK keys, the SNP_VLEK_LOAD SNP command is used to load +them into the system after obtaining them from the KDS, and corresponds +closely to the SNP_VLEK_LOAD firmware command specified in the SEV-SNP +spec. + 3. SEV-SNP CPUID Enforcement ============================ diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c index 2102377f727b..97a7959406ee 100644 --- a/drivers/crypto/ccp/sev-dev.c +++ b/drivers/crypto/ccp/sev-dev.c @@ -2027,6 +2027,39 @@ static int sev_ioctl_do_snp_set_config(struct sev_issue_cmd *argp, bool writable return __sev_do_cmd_locked(SEV_CMD_SNP_CONFIG, &config, &argp->error); } +static int sev_ioctl_do_snp_vlek_load(struct sev_issue_cmd *argp, bool writable) +{ + struct sev_device *sev = psp_master->sev_data; + struct sev_user_data_snp_vlek_load input; + void *blob; + int ret; + + if (!sev->snp_initialized || !argp->data) + return -EINVAL; + + if (!writable) + return -EPERM; + + if (copy_from_user(&input, u64_to_user_ptr(argp->data), sizeof(input))) + return -EFAULT; + + if (input.len != sizeof(input) || input.vlek_wrapped_version != 0) + return -EINVAL; + + blob = psp_copy_user_blob(input.vlek_wrapped_address, + sizeof(struct sev_user_data_snp_wrapped_vlek_hashstick)); + if (IS_ERR(blob)) + return PTR_ERR(blob); + + input.vlek_wrapped_address = __psp_pa(blob); + + ret = __sev_do_cmd_locked(SEV_CMD_SNP_VLEK_LOAD, &input, &argp->error); + + kfree(blob); + + return ret; +} + static long sev_ioctl(struct file *file, unsigned int ioctl, unsigned long arg) { void __user *argp = (void __user *)arg; @@ -2087,6 +2120,9 @@ static long sev_ioctl(struct file *file, unsigned int ioctl, unsigned long arg) case SNP_SET_CONFIG: ret = sev_ioctl_do_snp_set_config(&input, writable); break; + case SNP_VLEK_LOAD: + ret = sev_ioctl_do_snp_vlek_load(&input, writable); + break; default: ret = -EINVAL; goto out; diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h index b7a2c2ee35b7..2289b7c76c59 100644 --- a/include/uapi/linux/psp-sev.h +++ b/include/uapi/linux/psp-sev.h @@ -31,6 +31,7 @@ enum { SNP_PLATFORM_STATUS, SNP_COMMIT, SNP_SET_CONFIG, + SNP_VLEK_LOAD, SEV_MAX, }; @@ -214,6 +215,32 @@ struct sev_user_data_snp_config { __u8 rsvd1[52]; } __packed; +/** + * struct sev_data_snp_vlek_load - SNP_VLEK_LOAD structure + * + * @len: length of the command buffer read by the PSP + * @vlek_wrapped_version: version of wrapped VLEK hashstick (Must be 0h) + * @rsvd: reserved + * @vlek_wrapped_address: address of a wrapped VLEK hashstick + * (struct sev_user_data_snp_wrapped_vlek_hashstick) + */ +struct sev_user_data_snp_vlek_load { + __u32 len; /* In */ + __u8 vlek_wrapped_version; /* In */ + __u8 rsvd[3]; /* In */ + __u64 vlek_wrapped_address; /* In */ +} __packed; + +/** + * struct sev_user_data_snp_vlek_wrapped_vlek_hashstick - Wrapped VLEK data + * + * @data: Opaque data provided by AMD KDS (as described in SEV-SNP Firmware ABI + * 1.54, SNP_VLEK_LOAD) + */ +struct sev_user_data_snp_wrapped_vlek_hashstick { + __u8 data[432]; /* In */ +} __packed; + /** * struct sev_issue_cmd - SEV ioctl parameters *