From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15131C43603 for ; Thu, 21 Jan 2021 03:37:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8157238D6 for ; Thu, 21 Jan 2021 03:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbhAUDhf (ORCPT ); Wed, 20 Jan 2021 22:37:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:43144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730924AbhAUA5G (ORCPT ); Wed, 20 Jan 2021 19:57:06 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5837423787; Thu, 21 Jan 2021 00:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611190546; bh=KV28Ht8nRXvJJvq6ndE++WTzU0oDXHtG6Yq4FbS++H8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fqBhtTOyF/zqUlqAeuXmsLrmlt7XJHD2JEWtq56LucpH8Cp3LQ5AoOqCQuXIvChbl GGDivWUsacHCVsuo9xrNvQKGzPQCRDpHm0XO7zvcu58EHOQTbHySfnx4YZqDUK8A10 5FLaQck0nqGApoXYtTmZKUryPDmvEmzBrD8VrStmifhCYK4CpvpXKtmlHaD1x1ga81 MowHr0NOEZvcR13PWKrYRf3aiKTXk/wEqH655muZ/CxdGwAMCzKAYepKyvNdbsb1jQ 1gUdDLIjtTO2YUQ2JfsvFK5/TJBTWbx/n0jugtGvrXi7M3oTYVMv3Xo8XNMzj2YCxW ekpWbbAsrW/KA== Date: Thu, 21 Jan 2021 02:55:41 +0200 From: Jarkko Sakkinen To: Sean Christopherson Cc: Kai Huang , linux-sgx@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, luto@kernel.org, dave.hansen@intel.com, haitao.huang@intel.com, pbonzini@redhat.com, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Subject: Re: [RFC PATCH v2 05/26] x86/sgx: Introduce virtual EPC for use by KVM guests Message-ID: References: <4597db567351468c360fc810fff5a8232cb96c4c.1610935432.git.kai.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Thu, Jan 21, 2021 at 02:54:23AM +0200, Jarkko Sakkinen wrote: > On Wed, Jan 20, 2021 at 09:40:52AM -0800, Sean Christopherson wrote: > > On Wed, Jan 20, 2021, Jarkko Sakkinen wrote: > > > On Mon, Jan 18, 2021 at 04:26:53PM +1300, Kai Huang wrote: > > > > From: Sean Christopherson > > > > > > > > Add a misc device /dev/sgx_virt_epc to allow userspace to allocate "raw" > > > > EPC without an associated enclave. The intended and only known use case > > > > for raw EPC allocation is to expose EPC to a KVM guest, hence the > > > > virt_epc moniker, virt.{c,h} files and X86_SGX_VIRTUALIZATION Kconfig. > > > > > > Is /dev/sgx_virt_epc something only usable for KVM, or is there > > > any thinkable use outside of the KVM context? > > > > I can't think of a sane use case without KVM (or an out-of-tree hypervisor). > > Doing anything useful with EPC requires ENCLS, which means being able to run > > CPL0 code. > > OK, thanks for elaboration. > > To bring more context to my thinking to call this to sgx_vepc is that it's > kind of "standard" in other device names I've such as: > > - vhost_net > - vhci > - vtpm > - vcs* > - The list goes on.. > > Since "virtual something" is always abbreviated just with a 'v', wouldn't it > make sense to just follow along? And even kVm :-) /Jarkko