pub struct CpuidTscLeaves {
pub ratio_denominator: u32,
pub ratio_numerator: u32,
pub crystal_hz: u32,
pub base_mhz: u32,
}Expand description
CPUID leaves that publish a TscFrequency to a guest.
These are the raw register values a CPUID replay returns:
| Field | Register | Meaning |
|---|---|---|
ratio_denominator | 0x15:EAX | denominator of the TSC/crystal ratio |
ratio_numerator | 0x15:EBX | numerator of the TSC/crystal ratio |
crystal_hz | 0x15:ECX | core-crystal frequency, in Hz |
base_mhz | 0x16:EAX | nominal base frequency, in MHz |
A guest computes TSC_HZ = crystal_hz * ratio_numerator / ratio_denominator
and, when leaf 0x15 is unusable, falls back to base_mhz * 1_000_000.
A zeroed value therefore means “not published”; it is the default of
crate::s9vm::cpuid::CpuidPolicy and is replaced either by an explicit
policy or by the host frequency cache.
Fields§
§ratio_denominator: u32CPUID.0x15:EAX : ratio denominator (never zero in a valid value).
ratio_numerator: u32CPUID.0x15:EBX : ratio numerator (never zero in a valid value).
crystal_hz: u32CPUID.0x15:ECX : core-crystal frequency, in hertz.
base_mhz: u32CPUID.0x16:EAX : nominal base frequency, in megahertz.
Trait Implementations§
Source§impl Clone for CpuidTscLeaves
impl Clone for CpuidTscLeaves
impl Copy for CpuidTscLeaves
Source§impl Debug for CpuidTscLeaves
impl Debug for CpuidTscLeaves
Source§impl Default for CpuidTscLeaves
impl Default for CpuidTscLeaves
impl Eq for CpuidTscLeaves
Source§impl PartialEq for CpuidTscLeaves
impl PartialEq for CpuidTscLeaves
impl StructuralPartialEq for CpuidTscLeaves
Auto Trait Implementations§
impl Forget for CpuidTscLeaves
impl Freeze for CpuidTscLeaves
impl Move for CpuidTscLeaves
impl RefUnwindSafe for CpuidTscLeaves
impl Send for CpuidTscLeaves
impl Sync for CpuidTscLeaves
impl Unpin for CpuidTscLeaves
impl UnsafeUnpin for CpuidTscLeaves
impl UnwindSafe for CpuidTscLeaves
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more