Expand description
Handles operations using platform Time Stamp Counter (TSC).
Modules§
Structs§
Enums§
Statics§
Functions§
- bus_
freq_ hz - Returns the Bus frequency in Hz, based on reading Intel-specific cpuids, or None if the frequency can’t be determined from cpuids.
- calibrate_
tsc_ state - Calibrate the TSC state.
- fake_
tsc_ frequency_ cpuid - Given the tsc frequency in Hz and the bus frequency in Hz, return a fake version of cpuid leaf 0x15.
- get_
tsc_ sync_ mitigations - Given the state of the host TSCs in
tsc_state, and the number of vcpus that are intended to be run, return a set of affinities and TSC offsets to apply to those vcpus. - rdtsc_
safe 🔒 - standard_
deviation - Get the standard deviation of a
Vec<T>. - tsc_
freq_ hz - Returns the TSC frequency in Hz, based on reading Intel-specific cpuids, or None if the frequency can’t be determined from cpuids.
- tsc_
frequency - Returns the frequency of the host TSC. Calibration only happens once.
- tsc_
frequency_ cpuid - Gets the TSC frequency for cpuid leaf 0x15 from the existing leaves 0x15 and 0x16.
- tsc_
state - Returns the state of the host TSCs. Calibration only happens once.
- tsc_
sync_ 🔒mitigations_ inner
Type Aliases§
- Cpuid
Count Fn - Function to retrieve the given CPUID leaf and sub-leaf.