Re: [PATCH v8 2/3] x86/sgx: Introduce union with vepc_vaddr field for virtualization case

Zhiquan Li
2022-09-15T02:17:19Z

On 2022/9/14 23:46, Haitao Huang wrote:
> Maybe it's just me missing some prior knowledge. It's not obvious to me
> why you don't need any guard accessing the encl_owner field in ksgxd
> thread. Is it because all vepc pages are never put in the active list
> and encl_owner would never be null for all pages in that list?

Yes, all vepc pages are never put in the active list. The SGX core page
reclaimer doesn’t support reclaiming EPC pages allocated to KVM guests
through the virtual EPC driver.

> Regardless, could you add a few sentence here to to make the rule explicit?

More details please see the section "Virtual EPC" at
Documentation/x86/sgx.rst.

Thanks and Best Regards,
Zhiquan

>
> Thanks
> Haitao