Re: [PATCH v8 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-02-01 Thread Jarkko Sakkinen
On Tue Jan 30, 2024 at 4:09 AM EET, Haitao Huang wrote: > From: Kristen Carlson Accardi > > SGX Enclave Page Cache (EPC) memory allocations are separate from normal > RAM allocations, and are managed solely by the SGX subsystem. The > existing cgroup memory controller cannot be used to limit or

Re: [PATCH v8 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-01-30 Thread Haitao Huang
On Tue, 30 Jan 2024 09:22:14 -0600, Huang, Kai wrote: struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim) { + struct sgx_epc_cgroup *epc_cg; struct sgx_epc_page *page; + int ret; + + epc_cg = sgx_get_current_epc_cg(); + ret =

RE: [PATCH v8 04/15] x86/sgx: Implement basic EPC misc cgroup functionality

2024-01-30 Thread Huang, Kai
> struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim) { > + struct sgx_epc_cgroup *epc_cg; > struct sgx_epc_page *page; > + int ret; > + > + epc_cg = sgx_get_current_epc_cg(); > + ret = sgx_epc_cgroup_try_charge(epc_cg); > + if (ret) { > +