Re: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections

2018-11-06 Thread Jarkko Sakkinen
On Sat, Nov 03, 2018 at 03:22:34PM +0200, Andy Shevchenko wrote: > On Sat, Nov 3, 2018 at 1:17 AM Jarkko Sakkinen > wrote: > > > > From: Sean Christopherson > > > > Enumerate Enclave Page Cache (EPC) sections via CPUID and add the data > > structures necessary to track EPC pages so that they can

Re: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections

2018-11-05 Thread Jarkko Sakkinen
On Sat, Nov 03, 2018 at 03:22:34PM +0200, Andy Shevchenko wrote: > On Sat, Nov 3, 2018 at 1:17 AM Jarkko Sakkinen > wrote: > > > > From: Sean Christopherson > > > > Enumerate Enclave Page Cache (EPC) sections via CPUID and add the data > > structures necessary to track EPC pages so that they can

Re: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections

2018-11-05 Thread Jarkko Sakkinen
On Sat, Nov 03, 2018 at 01:07:27AM +, Jethro Beekman wrote: > > + for (i = 0; i < SGX_MAX_EPC_SECTIONS; i++) { > > Perhaps print a warning if there are more than SGX_MAX_EPC_SECTIONS sections > reported by CPUID. Makes sense. I'll add it. /Jarkko

Re: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections

2018-11-03 Thread Andy Shevchenko
On Sat, Nov 3, 2018 at 1:17 AM Jarkko Sakkinen wrote: > > From: Sean Christopherson > > 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,

Re: [PATCH v15 16/23] x86/sgx: Enumerate and track EPC sections

2018-11-02 Thread Jethro Beekman
On 2018-11-02 16:11, Jarkko Sakkinen wrote: diff --git a/arch/x86/kernel/cpu/intel_sgx.c b/arch/x86/kernel/cpu/intel_sgx.c new file mode 100644 index ..b86aa4111592 --- /dev/null +++ b/arch/x86/kernel/cpu/intel_sgx.c ... +static __init int sgx_page_cache_init(void) +{ + u32 ea