From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) (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 9654323C8 for ; Mon, 3 Oct 2022 18:53:17 +0000 (UTC) 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: Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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