All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@intel.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: "Tim Deegan" <tim@xen.org>, "Kevin Tian" <kevin.tian@intel.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	xen-devel@lists.xen.org, kai.huang@linux.intel.com,
	"Julien Grall" <julien.grall@arm.com>,
	"Jun Nakajima" <jun.nakajima@intel.com>,
	"David Scott" <dave@recoil.org>
Subject: Re: [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset
Date: Mon, 4 Dec 2017 21:10:04 +0800	[thread overview]
Message-ID: <20171204131004.GA724@winterfell.sh.intel.com> (raw)
In-Reply-To: <a592cd24-903b-5fac-f894-f07fc55d8a8d@linaro.org>

On Mon, Dec 04, 2017 at 11:13:45AM +0000, Julien Grall wrote:
> Hello,
> 

Hi Julien,

> I am not sure to understand why I am being CCed. But it looks like you CC
> everyone on each patch... Please CC only relevant person on each patch.
> 

Apologies...  I thought the whole pathset will provide more context for
the reviewers. Will drop you from unrelevant patches in next verion. And
I guess it's OK for me to drop you from replies on unrelevant patches of
this version too?

Regards,
Boqun

> Cheers,
> 
> On 04/12/17 00:15, Boqun Feng wrote:
> > From: Kai Huang <kai.huang@linux.intel.com>
> > 
> > Expose SGX in CPU featureset for HVM domain. SGX will not be supported for
> > PV domain, as ENCLS (which SGX driver in guest essentially runs) must run
> > in ring 0, while PV kernel runs in ring 3. Theoretically we can support SGX
> > in PV domain via either emulating #GP caused by ENCLS running in ring 3, or
> > by PV ENCLS but it is really not necessary at this stage.
> > 
> > SGX Launch Control is also exposed in CPU featureset for HVM domain. SGX
> > Launch Control depends on SGX.
> > 
> > Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
> > Signed-off-by: Boqun Feng <boqun.feng@intel.com>
> > ---
> >   xen/include/public/arch-x86/cpufeatureset.h | 3 ++-
> >   xen/tools/gen-cpuid.py                      | 3 +++
> >   2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h
> > index be6da8eaf17c..1f8510eebb1d 100644
> > --- a/xen/include/public/arch-x86/cpufeatureset.h
> > +++ b/xen/include/public/arch-x86/cpufeatureset.h
> > @@ -193,7 +193,7 @@ XEN_CPUFEATURE(XSAVES,        4*32+ 3) /*S  XSAVES/XRSTORS instructions */
> >   /* Intel-defined CPU features, CPUID level 0x00000007:0.ebx, word 5 */
> >   XEN_CPUFEATURE(FSGSBASE,      5*32+ 0) /*A  {RD,WR}{FS,GS}BASE instructions */
> >   XEN_CPUFEATURE(TSC_ADJUST,    5*32+ 1) /*S  TSC_ADJUST MSR available */
> > -XEN_CPUFEATURE(SGX,           5*32+ 2) /*   Software Guard extensions */
> > +XEN_CPUFEATURE(SGX,           5*32+ 2) /*H  Intel Software Guard extensions */
> >   XEN_CPUFEATURE(BMI1,          5*32+ 3) /*A  1st bit manipulation extensions */
> >   XEN_CPUFEATURE(HLE,           5*32+ 4) /*A  Hardware Lock Elision */
> >   XEN_CPUFEATURE(AVX2,          5*32+ 5) /*A  AVX2 instructions */
> > @@ -230,6 +230,7 @@ XEN_CPUFEATURE(PKU,           6*32+ 3) /*H  Protection Keys for Userspace */
> >   XEN_CPUFEATURE(OSPKE,         6*32+ 4) /*!  OS Protection Keys Enable */
> >   XEN_CPUFEATURE(AVX512_VPOPCNTDQ, 6*32+14) /*A  POPCNT for vectors of DW/QW */
> >   XEN_CPUFEATURE(RDPID,         6*32+22) /*A  RDPID instruction */
> > +XEN_CPUFEATURE(SGX_LC,        6*32+30) /*H Intel SGX Launch Control */
> >   /* AMD-defined CPU features, CPUID level 0x80000007.edx, word 7 */
> >   XEN_CPUFEATURE(ITSC,          7*32+ 8) /*   Invariant TSC */
> > diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
> > index 9ec4486f2b4b..4fef21203086 100755
> > --- a/xen/tools/gen-cpuid.py
> > +++ b/xen/tools/gen-cpuid.py
> > @@ -256,6 +256,9 @@ def crunch_numbers(state):
> >           AVX512F: [AVX512DQ, AVX512IFMA, AVX512PF, AVX512ER, AVX512CD,
> >                     AVX512BW, AVX512VL, AVX512VBMI, AVX512_4VNNIW,
> >                     AVX512_4FMAPS, AVX512_VPOPCNTDQ],
> > +
> > +        # SGX Launch Control depends on SGX
> > +        SGX: [SGX_LC],
> >       }
> >       deep_features = tuple(sorted(deps.keys()))
> > 
> 
> -- 
> Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2017-12-04 13:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04  0:15 [RFC PATCH v2 00/17] RFC: SGX Virtualization design and draft patches Boqun Feng
2017-12-04  0:15 ` [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset Boqun Feng
2017-12-04 11:13   ` Julien Grall
2017-12-04 13:10     ` Boqun Feng [this message]
2017-12-04 14:13       ` Jan Beulich
2017-12-05  0:22         ` Boqun Feng
2017-12-04  0:15 ` [PATCH v2 02/17] xen: x86: add early stage SGX feature detection Boqun Feng
2017-12-04  0:15 ` [PATCH v2 03/17] xen: vmx: detect ENCLS VMEXIT Boqun Feng
2017-12-04  0:15 ` [PATCH v2 04/17] xen: x86/mm: introduce ioremap_wb() Boqun Feng
2017-12-04  0:15 ` [PATCH v2 05/17] xen: p2m: new 'p2m_epc' type for EPC mapping Boqun Feng
2017-12-04  0:15 ` [PATCH v2 06/17] xen: mm: introduce non-scrubbable pages Boqun Feng
2017-12-04  0:15 ` [PATCH v2 07/17] xen: mm: manage EPC pages in Xen heaps Boqun Feng
2017-12-04  0:15 ` [PATCH v2 08/17] xen: x86/mm: add SGX EPC management Boqun Feng
2017-12-04  0:15 ` [PATCH v2 09/17] xen: x86: add functions to populate and destroy EPC for domain Boqun Feng
2017-12-04  0:15 ` [PATCH v2 10/17] xen: x86: add SGX cpuid handling support Boqun Feng
2017-12-04  0:15 ` [PATCH v2 11/17] xen: vmx: handle SGX related MSRs Boqun Feng
2017-12-04  0:15 ` [PATCH v2 12/17] xen: vmx: handle ENCLS VMEXIT Boqun Feng
2017-12-04  0:15 ` [PATCH v2 13/17] xen: vmx: handle VMEXIT from SGX enclave Boqun Feng
2017-12-04  0:15 ` [PATCH v2 14/17] xen: x86: reset EPC when guest got suspended Boqun Feng
2017-12-04  0:15 ` [PATCH v2 15/17] xen: tools: add new 'sgx' parameter support Boqun Feng
2017-12-04  0:15 ` [PATCH v2 16/17] xen: tools: add SGX to applying CPUID policy Boqun Feng
2017-12-04  0:15 ` [PATCH v2 17/17] xen: tools: add SGX to applying MSR policy Boqun Feng
2017-12-25  5:01 ` [RFC PATCH v2 00/17] RFC: SGX Virtualization design and draft patches Boqun Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171204131004.GA724@winterfell.sh.intel.com \
    --to=boqun.feng@intel.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dave@recoil.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@linaro.org \
    --cc=jun.nakajima@intel.com \
    --cc=kai.huang@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.