Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KVM: VMX: Inject #GP, not #UD, if SGX2 ENCLS leafs are unsupported
Per Intel's SDM, unsupported ENCLS leafs result in a #GP, not a #UD. SGX1 is a special snowflake as the SGX1 flag is used by the CPU as a "soft" disable, e.g. if software disables machine check reporting, i.e. having SGX but not SGX1 is effectively "SGX completely unsupported" and and thus #UDs. Fixes: 9798adb ("KVM: VMX: Frame in ENCLS handler for SGX virtualization") Cc: Binbin Wu <[email protected]> Cc: Kai Huang <[email protected]> Tested-by: Kai Huang <[email protected]> Reviewed-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
- Loading branch information