On Fri, 2022-05-20 at 00:59 +0300, Jarkko Sakkinen wrote: > > I think this patch set is going taking wrong approach. Instead it would > > be better just to re-use struct sgx_encl_page. > > > > Things will get out of hands, if we have a struct of each flavor of the > > same entity. > > > > Additionally, it will take virtualization code a step closer to be > > feasible for the page reclaimer consumption. > > I have a better idea. Why don't you simply store 'vaddr' to 'owner', > i.e. > > epc_page = sgx_alloc_epc_page((void *)addr, false); > > The new struct is useless, or harmful, because it consumes memory. > SGX_EPC_PAGE_IS_VEPC is there to interpret the meaning of the field > correctly. This is also fine to me. -- Thanks, -Kai