Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3220027rwb; Mon, 3 Oct 2022 11:23:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64b9dq1GXyU/U9dN2BJ7duYznJMJixDb5qdbNXCY9GydumrI4OM1+CN2X37dgNeVb5rBv8 X-Received: by 2002:a17:907:3fa1:b0:782:e53:7ab7 with SMTP id hr33-20020a1709073fa100b007820e537ab7mr16617252ejc.144.1664821435305; Mon, 03 Oct 2022 11:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664821435; cv=none; d=google.com; s=arc-20160816; b=c+Pt2wBUKwsBqatHLUrgXAfA1xmxA/MLdmkfU62Tuq1DE+52iojkzmec5oKvT1QFpp P/cNq0TaTA8wLDz2myl9VUa36g9qkNHsUJxx2XgNSiuxwfa9y0EesnU87trwqtFmD1m9 WhL9no9qgy4awYg3lpKxO5pOtzm2LMa+Rqua7YwiQvTMzeIVdKY7YrGQQRfE0SvXG8kf p/LkWTsgDQ+NWmCgOCH3lhTC9PlQ/4sLWNv3PIqHy/p4Qf5/vXgKZYZbeIX0EwMPC6ww +Lx3nsh4hjlq/XHRkwJyCcuT5AEUQu8E1V15xU+PzhMZ6z8ZLSTBV0bTP2Bml02Uwb0J 83nA== 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=2w76/y5fSDNg4MMUq2sZOt4nJbULUyV++7iAWk2cTIQ=; b=PJr4PkcjAhPvEOrqJcatQ9YCNhGae/4YCG+Wlr5ak31Aur1013sOu97pH4mlggxMtG 22ZAIPIfSbYuxhpsHMyooIg9F54IZ6/8yoOwOY+UQJpGD1RJ8BigfFqfrSmF98dwwUF9 2TSQ0aJwcoc7YmwqVBjzolNRinv70cAkVf1l/5VTIaTBy0KtL184m0VfYYHJNAKD9ubI FWZsFfoPcVEq7bNsKIcGLRTa2tzsJcLfHWkCssosQenYB1uPazPz+u+UOG1XAmKhV/Cx X1DNh1AOXGKdewJ+tMJUVOpVZuW5f3gl7oABWSo0VPvXyifVfrRUYvE7mz0/I+uomaR3 Cv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hvrms6oD; 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 a7-20020a509b47000000b00451a9bc10casi7825207edj.196.2022.10.03.11.23.21; Mon, 03 Oct 2022 11:23:55 -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=hvrms6oD; 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 S229707AbiJCSQ7 (ORCPT + 99 others); Mon, 3 Oct 2022 14:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiJCSQ6 (ORCPT ); Mon, 3 Oct 2022 14:16:58 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52A582B243; Mon, 3 Oct 2022 11:16:57 -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 E11EA1EC04F0; Mon, 3 Oct 2022 20:16:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664821011; 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=2w76/y5fSDNg4MMUq2sZOt4nJbULUyV++7iAWk2cTIQ=; b=hvrms6oDaoSQMvX6bsRISlwVU1UnL3NPL+POl+uz4e3mdDksYWCYlVaBE1orql9puF3akq raxW6vLj36Z0Cdy6u1Jzb3PwF1f9R/FhgYk6CT/xuc0gTZrIzWzCdQ2FsZjAKQSRrnxn1d LRLLLSD8N9Xubs9+WayNNhecsCiARNI= Date: Mon, 3 Oct 2022 20:16:47 +0200 From: Borislav Petkov To: Peter Gonda Cc: "Kalra, Ashish" , "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" , "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 12:01:19PM -0600, Peter Gonda wrote: > We already have sev_issue_cmd_external_user() exported right? > > Another option could be to make these wrappers more helpful and less > silly. For example. My point is, whenever something needs to issue a SEV* fw command, something adds a silly wrapper and this will become unwieldy pretty quickly. If a wrapper is not a dumb one but it actually does preparatory work before issuing the command so that the caller's life is made easy, then yes, by all means. If it is only plain forwarding a call to sev_do_cmd(), then I question the whole point of the exercise... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette