On Fri, Oct 22, 2021 at 11:46:30PM +0200, Paolo Bonzini wrote:
> On 22/10/21 21:27, Yang Zhong wrote:
> >+
> >+for (j = 0; j < num; j++) {
> >+epc = pcms->sgx_epc.sections[j];
> >+hostmem = MEMORY_BACKEND(epc->hostmem);
> >+fd = memory_region_get_fd(host_memory_backend_g
On 22/10/21 21:27, Yang Zhong wrote:
+
+for (j = 0; j < num; j++) {
+epc = pcms->sgx_epc.sections[j];
+hostmem = MEMORY_BACKEND(epc->hostmem);
+fd = memory_region_get_fd(host_memory_backend_get_memory(hostmem));
+
+failures = ioctl(fd, SGX_IOC_VEPC_REMOVE_ALL);
For bare-metal SGX on real hardware, the hardware provides guarantees
SGX state at reboot. For instance, all pages start out uninitialized.
The vepc driver provides a similar guarantee today for freshly-opened
vepc instances, but guests such as Windows expect all pages to be in
uninitialized state