lkml.org 
[lkml]   [2018]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections
On Sat, Nov 3, 2018 at 1:17 AM Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
>
> From: Sean Christopherson <sean.j.christopherson@intel.com>
>
> Enumerate Enclave Page Cache (EPC) sections via CPUID and add the data
> structures necessary to track EPC pages so that they can be allocated,
> freed and managed. As a system may have multiple EPC sections, invoke
> CPUID on SGX sub-leafs until an invalid leaf is encountered.
>
> On NUMA systems, a node can have at most one bank. A bank can be at
> most part of two nodes. SGX supports both nodes with a single memory
> controller and also sub-cluster nodes with severals memory controllers
> on a single die.
>
> For simplicity, support a maximum of eight EPC sections. Current
> client hardware supports only a single section, while upcoming server
> hardware will support at most eight sections. Bounding the number of
> sections also allows the section ID to be embedded along with a page's
> offset in a single unsigned long, enabling easy retrieval of both the
> VA and PA for a given page.

> + iounmap(section->va);

> + section->va = ioremap_cache(addr, size);
> + if (!section->va)
> + return -ENOMEM;

I forgot if it's a place in code on which we discussed ioremap() vs.
memremap() call.
And I forgot why the conclusion is to leave ioremap().

Sorry, if I'm mistaken.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-11-03 14:23    [W:0.312 / U:1.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site