Add CET feature support in SMM
References: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf
Section "8.2 Feature Enumeration" explains the CPUID leaves / bits that advertize the related features. If you rely on CPUID, and conditional jumps, in such assembly code that runs either in 16-bit mode SMM, or is otherwise related to processor mode switching, please be aware that jumps in such contexts may crash on QEMU. See for example commit 8d4d55b15b58 ("UefiCpuPkg/PiSmmCpuDxeSmm: eliminate conditional jump in IA32 SmmStartup()", 2018-01-31). When you post the series to edk2-devel, please be sure to CC all the maintainers and reviewers listed for UefiCpuPkg in the Maintainers.txt file. Thanks!
Some early code is at https://github.com/jyao1/edk2/tree/CET. They are validated on Qemu, which does not have CET support. The final version will be updated after new document publish.
Fix it at edk2 68edd7dbad77d7170ee0e1c5dbefae93ea9997b1..3eb69b081c683f9d825930d0c511e43c0485e5d2