Previously, Linux-SGX PAL failed on all CPUID leaves not mentioned in our internal CPUID table. This is not how the actual Intel CPUID instruction behaves: some CPUID leaves are explicitly reserved and always return zeros, and the rest CPUID leaves return the info as if they are the "highest basic information leaf".
This PR adds such handling to make our CPUID logic exactly the same as in the latest Intel SDM documentation.
Fixes #2439 .
How to test this PR?
Added more testing to the cpuid LibOS regression test.
Description of the changes
Previously, Linux-SGX PAL failed on all CPUID leaves not mentioned in our internal CPUID table. This is not how the actual Intel CPUID instruction behaves: some CPUID leaves are explicitly reserved and always return zeros, and the rest CPUID leaves return the info as if they are the "highest basic information leaf".
This PR adds such handling to make our CPUID logic exactly the same as in the latest Intel SDM documentation.
Fixes #2439 .
How to test this PR?
Added more testing to the
cpuid
LibOS regression test.This change is