lkml.org 
[lkml]   [2019]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v24 08/24] x86/sgx: Enumerate and track EPC sections
On Wed, Dec 18, 2019 at 10:18:56AM +0100, Borislav Petkov wrote:
> On Sat, Nov 30, 2019 at 01:13:10AM +0200, Jarkko Sakkinen wrote:
> > +static bool __init sgx_alloc_epc_section(u64 addr, u64 size,
> > + unsigned long index,
> > + struct sgx_epc_section *section)
> > +{
> > + unsigned long nr_pages = size >> PAGE_SHIFT;
>
> I'm assuming here that size which gets communicated through CPUID -
> which is an interesting way to communicate SGX settings in itself :-) - is
> in multiples of 4K? SDM doesn't say...

Yes, EPC pages are architecturally defined to be 4k sized and aligned.

36.5 Enclave Page Cache

The EPC is divided into EPC pages. An EPC page is 4KB in size and always
aligned on a 4KB boundary.

\
 
 \ /
  Last update: 2019-12-18 16:20    [W:0.060 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site