Re: [PATCH v2 02/25] x86/cpufeatures: Add SGX1 and SGX2 sub-features

2021-03-12 Thread Sean Christopherson
On Tue, Mar 09, 2021, Kai Huang wrote: > @@ -290,6 +290,8 @@ > #define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in > kernel entry SWAPGS path */ > #define X86_FEATURE_SPLIT_LOCK_DETECT(11*32+ 6) /* #AC for split > lock */ > #define X86_FEATURE_PER_THREAD_MBA (11*3

[PATCH v2 02/25] x86/cpufeatures: Add SGX1 and SGX2 sub-features

2021-03-08 Thread Kai Huang
From: Sean Christopherson Add SGX1 and SGX2 feature flags, via CPUID.0x12.0x0.EAX, as scattered features, since adding a new leaf for only two bits would be wasteful. As part of virtualizing SGX, KVM will expose the SGX CPUID leafs to its guest, and to do so correctly needs to query hardware and