Skip to content

Update rust-cpuid to support libcpuid 0.4.0#5

Open
abronan wants to merge 1 commit intozsiciarz:masterfrom
abronan:support_0.4.0
Open

Update rust-cpuid to support libcpuid 0.4.0#5
abronan wants to merge 1 commit intozsiciarz:masterfrom
abronan:support_0.4.0

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 abeslic@abronan.com

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>
@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