Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3181220rwb; Mon, 3 Oct 2022 10:50:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5MxEdY38fgcRXejZnPFTR7D4AYT2cHdoxHmfavhwFF73y7JK8QFQaKCG7cMDQe3qfn6l0D X-Received: by 2002:a65:604d:0:b0:43c:9d8c:813a with SMTP id a13-20020a65604d000000b0043c9d8c813amr20249523pgp.572.1664819399988; Mon, 03 Oct 2022 10:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664819399; cv=none; d=google.com; s=arc-20160816; b=QiYUxU9+C9gmdXUHc6oxUkzwfOLNZjngGxnamtA2TXkQRIXEpkytvafzzMGv4WE6Mh ozArQutSgquMKueO6xsQuM3EIXogHN7XUhrSQSvLZ9aY/M4eaeMml2jT2C0F9erQPyH0 LHvRMd9Dmu9laqHo87u+ma8hCdEWaiZzgVwYusgpQqe0sBlA+s1FYZoENWt8OGY5yEC8 qsx8dMaOuIhTBQBv0h+K9nIIuxp9IwuuPtpQHtFsMIhG2SQlmXULSAFZeP+FKn7yiR3v rhRvkJwqMJtM2PWc4VaiDUQWoif475grabyZSIiziC277McfAUSmFXDP0qLs9zeXbwxP nauQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=plJ2XzPIs7brq2OHEhWH7olZUohmW4drMik6bkobaK8=; b=cY3sLuLyjPfLuwIcM728JWrYV0MaolFvC3YosK2XhjYzRnrUsQJOxTydkSzSGkafjw JbiAfq535ubYh5ipsYvtcAOFAtfCmHHDBkIxtlHPdJTHm0soq+8AWpZ1XD3yEJiFsQ4T pBJrzBToiqhGHAWndTwss5yx3cFNPHae6qSBJ0djeSHQbYU0t6jGtCCmGq2TN0P2OucZ lW8SC+Ct9FeymjJ1TlsctZQly7CoTm+X+6QAkeMNeNs6gxhL7z3cu/2l+1G3wsnSJguH T/c5r4abl3bnXBL+uZ4hF92+cDw8XfshoviQfuRG1jfQ/KOfCMyyBO9x8kMWcnbzUUas J8yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="h/NWZd03"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b21-20020a056a000cd500b00548045c4fb4si12102959pfv.334.2022.10.03.10.49.36; Mon, 03 Oct 2022 10:49:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="h/NWZd03"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbiJCRpp (ORCPT + 99 others); Mon, 3 Oct 2022 13:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbiJCRpf (ORCPT ); Mon, 3 Oct 2022 13:45:35 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45CC01AD8F; Mon, 3 Oct 2022 10:45:28 -0700 (PDT) Received: from zn.tnic (p200300ea9733e749329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e749:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E039F1EC026E; Mon, 3 Oct 2022 19:45:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664819122; h=from:from: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:in-reply-to:in-reply-to: references:references; bh=plJ2XzPIs7brq2OHEhWH7olZUohmW4drMik6bkobaK8=; b=h/NWZd03ZDDYChaZJG9X1m8XSdmrio7RdvYAB9fvU6LnkKsu556+yU34LFEPtT4S0+DtbK bkbEzT5/xoQqrTUBJf2dnKJofdXjuRz9CJjLNUDgzHADxBWNuBhA5+z32F5YXOvWQX6gwB 67IRwD39ZaSHFdkca/nu44PvYz/l40k= Date: Mon, 3 Oct 2022 19:45:18 +0200 From: Borislav Petkov To: "Kalra, Ashish" Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-coco@lists.linux.dev" , "linux-mm@kvack.org" , "linux-crypto@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "jroedel@suse.de" , "Lendacky, Thomas" , "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" , "dovmurik@linux.ibm.com" , "tobin@ibm.com" , "Roth, Michael" , "vbabka@suse.cz" , "kirill@shutemov.name" , "ak@linux.intel.com" , "tony.luck@intel.com" , "marcorr@google.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "alpergun@google.com" , "dgilbert@redhat.com" , "jarkko@kernel.org" Subject: Re: [PATCH Part2 v6 13/49] crypto:ccp: Provide APIs to issue SEV-SNP commands Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Oct 03, 2022 at 05:11:05PM +0000, Kalra, Ashish wrote: > They are basically providing the APIs for the hypervisor to manage a > SNP guest. Yes, I know. But that is not my question. Lemme try again. My previous comment was: "I think you should simply export sev_do_cmd() and call it instead." In this case, the API is a single function - sev_do_cmd() - which the hypervisor calls. So my question still stands: why is it better to have silly wrappers of sev_do_cmd() instead of having the hypervisor call sev_do_cmd() directly? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette