Re: [PATCH 2/2] x86: sgx_vepc: implement SGX_IOC_VEPC_REMOVE_ALL ioctl

From: Paolo Bonzini
Date: Tue Sep 21 2021 - 06:29:23 EST


On 21/09/21 01:09, Dave Hansen wrote:
Maybe also worth to mention userspace should guarantee there's no vcpu running
inside guest enclave when resetting guest's virtual EPC.
Why, specifically?

Is it because EREMOVE will also fail if there is a CPU running in the
enclave?

Yes, and SGX_ENCLAVE_ACT would cause a WARN. Good catch, Kai, I'll fix it.

Paolo