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

2024-03-09 Thread Haitao Huang
On Tue, 27 Feb 2024 15:35:38 -0600, Haitao Huang wrote: On Mon, 26 Feb 2024 12:25:58 -0600, Michal Koutný wrote: On Mon, Feb 05, 2024 at 01:06:27PM -0800, Haitao Huang wrote: +static int sgx_epc_cgroup_alloc(struct misc_cg *cg); + +const struct misc_res_ops sgx_epc_cgroup_ops = { +

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

2024-02-27 Thread Haitao Huang
On Mon, 26 Feb 2024 12:25:58 -0600, Michal Koutný wrote: On Mon, Feb 05, 2024 at 01:06:27PM -0800, Haitao Huang wrote: +static int sgx_epc_cgroup_alloc(struct misc_cg *cg); + +const struct misc_res_ops sgx_epc_cgroup_ops = { + .alloc = sgx_epc_cgroup_alloc, + .free = sgx_epc_cgro

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

2024-02-26 Thread Michal Koutný
On Mon, Feb 05, 2024 at 01:06:27PM -0800, Haitao Huang wrote: > +static int sgx_epc_cgroup_alloc(struct misc_cg *cg); > + > +const struct misc_res_ops sgx_epc_cgroup_ops = { > + .alloc = sgx_epc_cgroup_alloc, > + .free = sgx_epc_cgroup_free, > +}; > + > +static void sgx_epc_misc_init(stru

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

2024-02-19 Thread Huang, Kai

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

2024-02-05 Thread Haitao Huang
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 account for SGX EPC memory, which is a desirable feature in some en