Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3260228rwb; Mon, 3 Oct 2022 12:03:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BsCVEVWGKdjGK7wIi7u/ZFEX/SThlM9tO5WmYM8+iQd9W0UpkYRD7fHBVvv7PF4rhBnab X-Received: by 2002:a17:906:974c:b0:784:d96c:b4fa with SMTP id o12-20020a170906974c00b00784d96cb4famr16140095ejy.391.1664823813011; Mon, 03 Oct 2022 12:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664823813; cv=none; d=google.com; s=arc-20160816; b=zqDa4jjnTIilD7O7dj0zlwAuOjCHvLLMdZPe7HjtO5teHWv2eWozBMid8twxo7BEa1 AIKwrGn728wcer1EkyGEeFj5YQilZKh+2W6RA1SeCHn6fbMwegI3gkQ38buil/pJFslY 34IMtRe8i08ZTlwKBntGd9Z2nr94sKwbBBo4Zy/JAmbG6I6b3VRjUyD/hr3+a9Q1mXi5 cK/cCtsHEVruExrvXJGgvGGhzNk3JA6s2HztVei+k87gE0EBDIH5ewTerPVkDkuhvEju TPwTc9W8msFwLXERi/5OT5/q+SiD7OkxjFNyIkj9HK4piQ9uMh6iVt/VG4nfPX6ktkza 8Dyw== 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=R8bHmrtFMiDIGq/QDSvn//OjvCHTj3nynX4H2L7IKDg=; b=Ssbwc9jQmIgqDLPsv40vvf0rEaVCJB5vzwTf892972hpK757lFDp4GtvgL//Zfa8UL X77zMA89ZaM9bARTSFTUEFxpv0FI8LVuY1ujl1bxgcN3e923XDYdTjiTRCkshUiUg8AL Iy0fA9wAqUbQndFyHvmAEOoJO1CiYWLo19zaUkuvVWn1D0JHrHwpv/evSP7qbZvyymPB aoZ17Dx1LTMXUTkZU7xKGVRekzkFjpTj9NNauZfdi03U2atUbVf/+3CxHom4Qfxph7i1 lJHBcA1XUaK6G1LIjxYeAzEgyR1eZdVploj/pkq4b7VkOVhx3djNsmPI195xQFDkyC8p LmFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=JY+iFR6L; 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 w15-20020a056402268f00b004480ab3ded0si2603699edd.228.2022.10.03.12.02.53; Mon, 03 Oct 2022 12:03:32 -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=JY+iFR6L; 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 S229616AbiJCSxT (ORCPT + 99 others); Mon, 3 Oct 2022 14:53:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiJCSxS (ORCPT ); Mon, 3 Oct 2022 14:53:18 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2027D43626; Mon, 3 Oct 2022 11:53:17 -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 4A9B01EC058A; Mon, 3 Oct 2022 20:53:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664823191; 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=R8bHmrtFMiDIGq/QDSvn//OjvCHTj3nynX4H2L7IKDg=; b=JY+iFR6LUw+2j+0kMallGnKBGDHCjF+lgNzTN3txyaOzftDklFB2GvXuUJukhnchiePllQ sV+c7qUoVvlDQabhBI/2RqaNEGsXSNIrbI11MX41/YV8frNwvKhUBua1ovz1bx28kdcLJ3 JXwlTMZd7GEm5zLD0jhYmmL4vFCupuU= Date: Mon, 3 Oct 2022 20:53:07 +0200 From: Borislav Petkov To: "Kalra, Ashish" Cc: Peter Gonda , "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 06:43:08PM +0000, Kalra, Ashish wrote: > probably it is nice to have an abstracted interface, Why is it "probably nice" to have an abstracted interface? Is the hypervisor allowed to issue only a subset of the commands? Do you want to control the arguments the hypervisor is supposed to send down to the firmware? There must be a reason why one would do an abstracted interface. Not just because and probably. Because from where I'm standing this looks like adding a bunch of random wrappers without any logic to it. So, if you wanna have an interface, you should think this through and design it properly and explain why it is there and how it is supposed to be used. Don't get me wrong - a properly designed interface to control what the HV issues to the firmware is not a bad idea. But it needs to be properly designed. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette