[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcgFstv5EjY2DzsLGAimxf3Z2g-Mych1zW40txS9b7Bmg@mail.gmail.com>
Date: Sat, 3 Nov 2018 15:11:39 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc: "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
linux-sgx@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
sean.j.christopherson@...el.com, nhorman@...hat.com,
npmccallum@...hat.com, serge.ayoun@...el.com,
shay.katz-zamir@...el.com, haitao.huang@...el.com,
mark.shanahan@...el.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v15 11/23] x86/sgx: Add definitions for SGX's CPUID leaf
and variable sub-leafs
On Sat, Nov 3, 2018 at 1:16 AM Jarkko Sakkinen
<jarkko.sakkinen@...ux.intel.com> wrote:
>
> SGX defines its own CPUID leaf, 0x12, along with a variable number of
> sub-leafs. Sub-leafs 0 and 1 are always available if SGX is supported
> and enumerate various SGX features, e.g. instruction sets and enclave
> capabilities. Sub-leafs 2+ are variable, both in their existence and
> in what they enumerate. Bits 3:0 of EAX report the sub-leaf type,
> with the remaining bits in EAX, EBX, ECX and EDX being type-specific.
> Currently, the only known sub-leaf type enumerates an EPC section. An
> EPC section is simply a range of EPC memory available to software.
> The "list" of varaible SGX sub-leafs is NULL-terminated, i.e. software
> is expected to query CPUID until an invalid sub-leaf is encountered.
> + SGX_CPUID_SUB_LEAF_TYPE_MASK = 0xF,
GENMASK() if it suits here?
P.S. Btw, BIT() and GENMASK() macros are now in a separate header,
i.e. linux/bits.h, perhaps you might need to revisit code to include
it explicitly
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists