Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rust-cpuid to support libcpuid 0.4.0 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abronan
Copy link

@abronan abronan commented Dec 9, 2016

Hi,

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()

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 of mem::uninitialized(). Looking at the documentation it seems that using mem::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 [email protected]

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 <[email protected]>
@zsiciarz zsiciarz self-assigned this Jan 16, 2017
@zyluo
Copy link

zyluo commented May 25, 2021

Any updates on this PR?

@abronan
Copy link
Author

abronan commented Jul 8, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants