Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp428967rdb; Mon, 15 Jan 2024 01:42:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtdG0C5OEBJmJeE+jOxhZK7P7vVObxIi2d7VJdFhnsVBh7vhO+gxRv0m/SNqbb9HWSHyzF X-Received: by 2002:a17:90a:5aa1:b0:28d:dd91:fdf5 with SMTP id n30-20020a17090a5aa100b0028ddd91fdf5mr3311528pji.23.1705311742731; Mon, 15 Jan 2024 01:42:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705311742; cv=none; d=google.com; s=arc-20160816; b=VWHCPaSuPt4ihf1VDo3+ES9RDv2WQeNuYDYKY/cPzzhnxlCUxbg3lkMgwxYCb0k1zd 92DOyUqCcgK8sfVpL08vqqTCZ60xgf3mBPTYWIz5kjhXNcwBuInT6A9ggeKQQlvHxDms /mSM0Zs2iebKL+R4M2qfiBg97b3J3ZsoMyBsZc4LPZf4IvY+t5QL6nA3xNn3MU57kW2k YZKq7ZTJ6BEMN5vfdrL2X6gYtnqp/plhJedVQxvcNv4g7KmbMV78w8CfoAqJmkN+jQpi kv6WrtS4V+Wz2MEzHKdv1DtYgHcna8oUUK0ug9uxEvOBCIyhG4OyPWcbAomennD2Vuae sw6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XBIKxlNsZUJPRPkrxlOi1GzgwTad37xoV2mYozz4U4g=; fh=PAJLcGNsgpyT0FrcvY89yVOVQNGKU/6iE6GpJZktfr8=; b=Aubt7Cr/1Ihbd0bEv0f/bzXctJFqAn+XjjPTX/f0MDiYsAMQMJdXlKA63WOq9fu9MF GacJg/0QpOu8q7eSLdgYxvmBhm7mslCApgtqXYGftLBzdaccmDVoS9kZXEatuUr6gQhM wtxI3BZpeTX8K8aDGc+g4OYoh0Rhu1fRhL70miqsO7IxLfhl8UDYq7PFholy3AkXP/km 8ou+ojMwwN6RtXnegglBaizEwxOyhpCKfcwODhm2/gBtT08o2xCDc4apCnblNqB6GxvZ bTIPOlN9N3gxu+r+U5DUP/7GZaV0e1086gHlC5PLZMPI800sXjwQnzlizkFdSobdrXZQ 3mHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=kZq7oIgp; spf=pass (google.com: domain of linux-crypto+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x13-20020a17090aca0d00b0028b62774a1bsi11270213pjt.125.2024.01.15.01.42.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 01:42:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=kZq7oIgp; spf=pass (google.com: domain of linux-crypto+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D291C281F3D for ; Mon, 15 Jan 2024 09:42:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DB17F9E5; Mon, 15 Jan 2024 09:42:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="kZq7oIgp" X-Original-To: linux-crypto@vger.kernel.org Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04EF9F9D3; Mon, 15 Jan 2024 09:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 367D240E016C; Mon, 15 Jan 2024 09:41:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gbcYK8KndIZR; Mon, 15 Jan 2024 09:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1705311716; bh=XBIKxlNsZUJPRPkrxlOi1GzgwTad37xoV2mYozz4U4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kZq7oIgpoPYNJEFRmQ9JE48d2cPjKOwShniYdb8svdbjNuXaCXgkI4vm7t9jN3tk3 0SyquZx6f4o+581UG8SQEF/a5JXBrhlewfKVgs0DWSPD7Xhu3x7KPorhxYHOrW/ZkW /WkS4JM23S0qQa6J6k/PMJ9/UFQC3c3EAtxAAudXnxy2OfmMr6GryU5ieNcRB0VUqF Kk56gR6BWxDGFlGlKPXEkv3AS1x2RjKgRjF4rN71FCEKHAR7JQV8a9ePmr0epXg4nr +K8OUef+fdVPdl9dDUwxnKAIEtAaEqwy5hTxtLcpu+fZI3TyrfY91wAV77MqGaQJX+ I9TV8Vr7MDR6A+XR2gzKocxtwZwUaUPYPtI71n52jydUwNRUFbuLfcJmGPHLs6vmCc GT15I5hrWJ5oS44BqXuvuQz7Gn+RxvthADl5Xqp7KraalD4OGnhM3sIkHtrlPoA+SP ElIlzTj3x2wO4UdsT9YEgQcRKXep+r2BCZohCYiRrppaZJ8uagtla5VglupvrYmOSB Uz8ExwhjAP5m15h1O0Q7sQH1RYxDEBqFCXtAiJLE2g5DCXhPEhpyNgmdJIGvMFTeRG 6p+xjuV3jBjkoXBYS7fHf89rG4lL2UmaOvBIU5i6yOHaa7F3eHhKV/VzYkAGlTfiYe I7Bqk/56DF97nG5LMUix8SaU= Received: from zn.tnic (pd9530f8c.dip0.t-ipconnect.de [217.83.15.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id AC6A940E01A9; Mon, 15 Jan 2024 09:41:19 +0000 (UTC) Date: Mon, 15 Jan 2024 10:41:12 +0100 From: Borislav Petkov To: Michael Roth Cc: x86@kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, tobin@ibm.com, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, jarkko@kernel.org, ashish.kalra@amd.com, nikunj.dadhania@amd.com, pankaj.gupta@amd.com, "liam.merwick@oracle.com Brijesh Singh" Subject: Re: [PATCH v1 12/26] crypto: ccp: Define the SEV-SNP commands Message-ID: <20240115094103.GFZaT9r4zX8V_ax8lv@fat_crate.local> References: <20231230161954.569267-1-michael.roth@amd.com> <20231230161954.569267-13-michael.roth@amd.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231230161954.569267-13-michael.roth@amd.com> On Sat, Dec 30, 2023 at 10:19:40AM -0600, Michael Roth wrote: > From: Brijesh Singh > > AMD introduced the next generation of SEV called SEV-SNP (Secure Nested > Paging). SEV-SNP builds upon existing SEV and SEV-ES functionality > while adding new hardware security protection. > > Define the commands and structures used to communicate with the AMD-SP > when creating and managing the SEV-SNP guests. The SEV-SNP firmware spec > is available at developer.amd.com/sev. > > Co-developed-by: Ashish Kalra > Signed-off-by: Ashish Kalra > Signed-off-by: Brijesh Singh > [mdr: update SNP command list and SNP status struct based on current > spec, use C99 flexible arrays, fix kernel-doc issues] > Signed-off-by: Michael Roth > --- > drivers/crypto/ccp/sev-dev.c | 16 +++ > include/linux/psp-sev.h | 264 +++++++++++++++++++++++++++++++++++ > include/uapi/linux/psp-sev.h | 56 ++++++++ > 3 files changed, 336 insertions(+) More ignored feedback: https://lore.kernel.org/r/20231124143630.GKZWC07hjqxkf60ni4@fat_crate.local Lemme send it to you as a diff then - it'll work then perhaps. diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h index 983d314b5ff5..1a76b5297f03 100644 --- a/include/linux/psp-sev.h +++ b/include/linux/psp-sev.h @@ -104,7 +104,7 @@ enum sev_cmd { SEV_CMD_SNP_PAGE_RECLAIM = 0x0C7, SEV_CMD_SNP_PAGE_UNSMASH = 0x0C8, SEV_CMD_SNP_CONFIG = 0x0C9, - SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX = 0x0CA, + SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX = 0x0CA, SEV_CMD_SNP_COMMIT = 0x0CB, SEV_CMD_SNP_VLEK_LOAD = 0x0CD, @@ -624,7 +624,8 @@ enum { * @gctx_paddr: system physical address of guest context page * @page_size: page size 0 indicates 4K and 1 indicates 2MB page * @page_type: encoded page type - * @imi_page: indicates that this page is part of the IMI of the guest + * @imi_page: indicates that this page is part of the IMI (Incoming + * Migration Image) of the guest * @rsvd: reserved * @rsvd2: reserved * @address: system physical address of destination page to encrypt -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette