Update rust-cpuid to support libcpuid 0.4.0#5
Open
abronan wants to merge 1 commit intozsiciarz:masterfrom
Open
Update rust-cpuid to support libcpuid 0.4.0#5abronan wants to merge 1 commit intozsiciarz:masterfrom
abronan wants to merge 1 commit intozsiciarz:masterfrom
Conversation
This commit updates rust-cpuid to support libcpuid version 0.4.0, mostly updating the structures and their allocation. It includes: - Update MAX_INTELFN4_LEVEL to usize 8 - Update cpu_raw_data_t with new intel fields - Update cpu_id_t to include new fields with sgx support - Update CPUFeature to include new features - Switch back to using Default::default() instead of mem::uninitialized() Signed-off-by: Alexandre Beslic <abeslic@abronan.com>
|
Any updates on this PR? |
Author
|
@zyluo Until this gets reviewed and merged into this repository, I have a working fork with this change merged in: https://github.com/MantissaLabs/rust-cpuid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi,
This commit updates rust-cpuid to support libcpuid
version
0.4.0, mostly updating the structures andtheir allocation. It includes:
MAX_INTELFN4_LEVELtousize 8cpu_raw_data_twith new intel fieldscpu_id_tto include new fields with sgx supportCPUFeatureto include new featuresDefault::default()instead ofmem::uninitialized()Regarding that last point, I'm not extremely familiar with undefined behavior (still fighting my way through the rustonomicon), thus I changed back to using
default()instead ofmem::uninitialized(). Looking at the documentation it seems that usingmem::uninitialized()is considered harmful. But I can update the PR and change this back if this is the preferred way to deal with initializing the structs.Not sure if this is going to pass through the CI but let's see! :)
Thanks for the lib!
Signed-off-by: Alexandre Beslic abeslic@abronan.com