Hi,
Currently, only PC machine supports SGX and microvm doesn't.
The commit 13be929aff80 ("target/i386: do not crash if microvm guest
uses SGX CPUID leaves") has cleaned up the CPUID 0x12.{0x2..N} for
microvm to avoid Guest crash.
Per my comment on that commit [1], microvm deserves more cleanup to
mask off CPUID 0x12.{0x0,0x1} subleaves as well. But once I actually got
my hands on this, I realized not only we need to clean up CPUID 0x12,
but also we should clean up CPUID 0x7.0.ebx[SGX] for microvm.
Thus, I have this series to completely clean up SGX for microvm.
[1]: https://lore.kernel.org/qemu-devel/Zpcz0cFjW8extm9T@intel.com/
Thanks and Best Regards,
Zhao
---
Zhao Liu (4):
target/i386/cpu: Remove unnecessary SGX feature words checks
target/i386/cpu: Explicitly express SGX_LC and SGX feature words
dependency
target/i386/cpu: Add dependencies of CPUID 0x12 leaves
target/i386/cpu: Mask off SGX/SGX_LC feature words for non-PC machine
hw/i386/sgx-stub.c | 5 ++++
hw/i386/sgx.c | 8 +++++++
include/hw/i386/sgx-epc.h | 1 +
target/i386/cpu.c | 50 ++++++++++++++++++++++++---------------
4 files changed, 45 insertions(+), 19 deletions(-)
--
2.34.1