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

Haitao Huang
2022-09-15T20:00:09Z

On Wed, 14 Sep 2022 21:22:33 -0500, Zhiquan Li <zhiquan1.li@intel.com>
wrote:

>
> 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 for pointing to that.
Haitao