summary refs log tree commit diff stats
path: root/include/hw/intc
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2021-11-01 12:20:09 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2021-11-10 22:57:40 +0100
commit2c3132279b9a962c27adaea53b4c8e8480385706 (patch)
tree26b93682da34ce418950d80e112776fac80ca9d4 /include/hw/intc
parentbd989ed44f847cba20b46a743770c152e188f365 (diff)
downloadfocaccia-qemu-2c3132279b9a962c27adaea53b4c8e8480385706.tar.gz
focaccia-qemu-2c3132279b9a962c27adaea53b4c8e8480385706.zip
sgx: Reset the vEPC regions during VM reboot
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 on startup, including after every guest reboot.

Qemu can invoke the ioctl to bring its vEPC pages back to uninitialized
state. There is a possibility that some pages fail to be removed if they
are SECS pages, and the child and SECS pages could be in separate vEPC
regions.  Therefore, the ioctl returns the number of EREMOVE failures,
telling Qemu to try the ioctl again after it's done with all vEPC regions.

The related kernel patches:
Link: https://lkml.kernel.org/r/20211021201155.1523989-3-pbonzini@redhat.com

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/intc')
0 files changed, 0 insertions, 0 deletions