All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support for more AVX512 Extended Features
- Fix bug in
has_waitpkg
using wrong bit flag.
- Fix a regression from v10.7.0. CpuIdReader was falsely required to
implement Debug for
CpuId::debug()
which is too strict.
-
The
CpuId
type now takes a generic reader argumentCpuId<R: CpuIdReader>
: which allows for more flexibility on how cpuid is queried and better support for using the library on non-x86 targets. This is a breaking change for users ofwith_cpuid_fn
and potentially when specifyingCpuId
as a type argument somewhere. To make existing code compile again, whenever a generic type argument for CpuId is needed, you can use thecpuid::NativeCpuIdReader
type which provides the default behavior of execution thecpuid
instruction.For example, in your code there might be cases where the compiler now asks you to specify the generic type of CpuId: e.g.,
fn take_cpuid(cpuid: CpuId)
would become:fn take_cpuid(cpuid: CpuId<NativeCpuIdReader>)
-
If you're using the
serialization
feature: It go revamped by fixing some long-standing problems with it that made it difficult to use #87. All types exceptCpuIdResult
types lost theirSerialize
andDeserialize
derives. Check the new example on how to serialize and deserialize cpuid information.
- Updated bitflags to v2.
- Include the pretty printing code in the library (instead of only having it in
the binary) (#137) This
introduces a new (optional)
display
feature.display
will also enablestd
so it can't be used inno_std
environments.
- Fix potential overflow during formatting when using the in cpuid binary to display cache information. (#133)
- Updated termimad to 0.20 (only affects
cpuid
binary version) - Add support for AMD leaf
0x8000_001E
- Add support for AMD leaf
0x8000_0019
- Updated
ExtendedFeatures
to include new features
- Updated phf to 0.11 (only affects
cfg(test)
) - Add support for AMD leaf
0x8000_001D
- Add support for AMD leaf
0x8000_001A
- Added support for cpuid leaf 0x1f (Extended Topology Information v2)
- Improved debug formatting for
ProcessorCapacityAndFeatureInfo
- Added ExtendedFeatures::has_avx512vnni().
- Allow to build/use the crate even if
native_cpuid
is not available on the target (one can still instantiate CpuId usingwith_cpuid_fn
in this case).
- Updated clap dependency.
- Fix Cache and TLB (leaf 0x02) formatting in cpuid binary.
- Added JSON and raw formatting to cpuid binary.
- AMD SVM feature leaf (0x8000_000A)
- Added methods to display upper 64-96 bits of processor serial number (
serial_all
,serial_upper
) - Implement
Display
forCacheType
- Implement
Display
forTopologyType
- Implement
Display
forDatType
- Implement
Display
forAssociativity
- Added
location()
method forExtendedState
as an alternative foris_in_ia32_xss
andis_in_xcr0
. - Added new
register()
method forExtendedState
to identify which register this instance refers to.
- Better formatting for cpuid binary.
-
Removed
get_extended_function_info
/ExtendedFunctionInfo
due to added AMD support: Useget_processor_brand_string
,get_extended_processor_and_feature_identifiers
,get_l1_cache_and_tlb_info
,get_l2_l3_cache_and_tlb_info
,get_advanced_power_mgmt_info
,get_processor_capacity_feature_info
instead:Migration guide for replacing
get_extended_function_info
/ExtendedFunctionInfo
:<= v9 >= v10 processor_brand_string()
CpuId.get_processor_brand_string
cache_line_size()
Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_line_size()
l2_associativity()
Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_associativity()
cache_size()
Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_size()
physical_address_bits()
CpuId.get_processor_capacity_feature_info().physical_address_bits()
linear_address_bits()
CpuId.get_processor_capacity_feature_info().linear_address_bits()
has_invariant_tsc()
CpuId.get_advanced_power_mgmt_info.has_invariant_tsc()
has_lahf_sahf()
CpuId.get_extended_processor_and_feature_identifiers().has_lahf_sahf()
has_lzcnt()
CpuId.get_extended_processor_and_feature_identifiers().has_lzcnt()
has_prefetchw()
CpuId.get_extended_processor_and_feature_identifiers().has_prefetchw()
has_syscall_sysret()
CpuId.get_extended_processor_and_feature_identifiers().has_syscall_sysret()
has_execute_disable()
CpuId.get_extended_processor_and_feature_identifiers().has_execute_disable()
has_1gib_pages()
CpuId.get_extended_processor_and_feature_identifiers().has_1gib_pages()
has_rdtscp()
CpuId.get_extended_processor_and_feature_identifiers().has_rdtscp()
has_64bit_mode()
CpuId.get_extended_processor_and_feature_identifiers().has_64bit_mode()
-
Removed
CpuId.deterministic_address_translation_info
. UseCpuId.get_deterministic_address_translation_info
instead. -
Renamed
model_id
andfamily_id
tobase_model_id
andbase_family_id
inFeatureInfo
. Added newfamily_id
andmodel_id
functions that compute the actual model and family according to the spec by joining base and extended family/model. -
Extend Hypervisor enum with more variants (#50)
-
Remove
has_rdseet
function (deprecated since 3.2), clients should use the correctly namedhas_rdseed
function instead.Migration guide for
cpuid.get_feature_info()
:<= v9 >= v10 has_rdseet()
has_rdseed()
-
Removed
Default
traits for most structs.default()
should not be used anymore.
- Updated Debug trait for SGX iterators.
- Make CpuId derive Clone and Copy (#53)
- Improved documentation in some places by adding leaf numbers.
- Updated AMD leaf 0x8000_001f (Encrypted Memory) to latest manual.
ProcessorBrandString.as_str()
now trims the returned string.- Fix
RdtAllocationInfo.memory_bandwidth_allocation()
which was using l2cat availability to determine if it exists.
- Added AMD support for leaf 0x8000_0001
- Added AMD support for leaf 0x8000_0005
- Added AMD support for leaf 0x8000_0006
- Added AMD support for leaf 0x8000_0007
- Added AMD support for leaf 0x8000_0008
VendorInfo.as_string()
is deprecated in favor ofVendorInfo.as_str()
SoCVendorBrand.as_string()
is deprecated in favor ofSoCVendorBrand.as_str()
- Use more idiomatic rust code in readme/doc.rs example.
- Use
str::from_utf8
instead ofstr::from_utf8_unchecked
to avoid potential panics with the Deserialize trait (#43). - More extensive Debug trait implementation (#49)
- Fix 2 clippy warnings
- A
CpuId::with_cpuid_fn
that allows to override the default cpuid function.
- Fixed
RdtAllocationInfo.has_memory_bandwidth_allocation
: was using the wrong bit - Fixed
capacity_mask_length
inL3CatInfo
andL2CatInfo
: add +1 to returned value - Fixed
MemBwAllocationInfo.max_hba_throttling
: add +1 to returned value - Refactored tests into a module.
- Started to add tests for Ryzen/AMD.