[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f31636e6155428ab69153fec8dd7ac31f888ffe.camel@intel.com>
Date: Wed, 03 Mar 2021 07:27:42 +1300
From: Kai Huang <kai.huang@...el.com>
To: Boris Petkov <bp@...en8.de>,
Sean Christopherson <seanjc@...gle.com>
Cc: kvm@...r.kernel.org, x86@...nel.org, linux-sgx@...r.kernel.org,
linux-kernel@...r.kernel.org, jarkko@...nel.org, luto@...nel.org,
dave.hansen@...el.com, rick.p.edgecombe@...el.com,
haitao.huang@...el.com, pbonzini@...hat.com, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH 02/25] x86/cpufeatures: Add SGX1 and SGX2 sub-features
On Tue, 2021-03-02 at 18:53 +0100, Boris Petkov wrote:
> On March 2, 2021 5:02:13 PM GMT+01:00, Sean Christopherson <seanjc@...gle.com> wrote:
> > The KVM use case is to query /proc/cpuinfo to see if sgx2 can be
> > enabled in a
> > guest.
>
> You mean before the guest ia created? I sure hope there's a better way to query HV-supported features than grepping /proc/cpuinfo...
>
> > The counter-argument to that is we might want sgx2 in /proc/cpuinfo to
> > mean sgx2
> > is enabled in hardware _and_ supported by the kernel. Userspace can
> > grep for
> > sgx in /proc/cpuinfo, and use cpuid to discover sgx2, so it's not a
> > blocker.
>
> Question is, what exactly that flag should denote: that EDMM is supported in the HV and guests can do the dynamic thing of adding/rwmoving EPC pages? Is that the only feature behind SGX2?
Yes SGX2 == EDMM. Other sub-features, such as VMM oversubscription, have other CPUID
bits.
>
> > That being said, adding some form of capability/versioning to SGX seems
> > inevitable, not sure it's worth witholding sgx2 from /proc/cpuinfo.
>
> See what I typed earlier - no objections from me if a proper use case is identified and written down.
>
> Thx.
Powered by blists - more mailing lists