native/cpu/x86: Add support for CPUID EAX=80000000h #1811
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cpuid
withEAX=80000000h
is meant to return the highest "extended function" ID back viaEAX
.Both Intel's and AMD's docs are a little oblique when it comes to what exactly an "extended function" ID is, but it seems to just be another
EAX
value (i.e.,CPUID
"leaf") with the high bit (i.e.EAX=8xxxxxxxh
) set.Longer term, we should probably support some of these higher extended functions/leaves. In particular, it looks like recent versions of the Linux VDSO check for
CPUID EAX=80000001h
and then check ifEDX.RDTSCP[bit 27]
is high in order to userdtscp
(in lieu ofrdtsc
+ a serializing hack?).