pub struct HwCaps {Show 35 fields
pub allowed: bool,
pub feature_control_locked: bool,
pub control_block_revision: u32,
pub control_block_size: u16,
pub control_block_memory_type: u8,
pub has_true_controls: bool,
pub ept: bool,
pub ept_four_levels: bool,
pub ept_2mb: bool,
pub ept_1gb: bool,
pub ept_wb: bool,
pub ept_ad: bool,
pub invept: bool,
pub vpid: bool,
pub invvpid_single_context: bool,
pub invvpid_all_context: bool,
pub invvpid_individual_address: bool,
pub unrestricted_guest: bool,
pub apic_register_virt: bool,
pub virtual_interrupt_delivery: bool,
pub posted_interrupts: bool,
pub pause_loop_exiting: bool,
pub virtualize_x2apic: bool,
pub preemption_timer: bool,
pub virtual_nmis: bool,
pub rdseed: bool,
pub pin_allowed: AllowedControls,
pub primary_proc_allowed: AllowedControls,
pub secondary_proc_allowed: AllowedControls,
pub exit_allowed: AllowedControls,
pub entry_allowed: AllowedControls,
pub cr0_fixed0: u64,
pub cr0_fixed1: u64,
pub cr4_fixed0: u64,
pub cr4_fixed1: u64,
}Expand description
Set of decoded capabilities, used by the s9vm engine.
Fields§
§allowed: boolThe firmware allows enabling (bit 2 of IA32_FEATURE_CONTROL).
feature_control_locked: boolMSR IA32_FEATURE_CONTROL locked (if it is not, it can be
written once to allow enabling).
control_block_revision: u32Control block revision identifier (bits 30:0 of MSR_BASIC).
control_block_size: u16Size of the control block region in bytes (bits 44:32).
control_block_memory_type: u8Recommended memory type for the region (bits 53:50; 6 = WB).
has_true_controls: boolThe “TRUE_*” bits are available.
ept: boolEPT available (allowed on the secondary controls side).
ept_four_levels: boolEPT with 4 walk levels.
ept_2mb: boolEPT 2 MiB.
ept_1gb: boolEPT 1 GiB.
ept_wb: boolEPT in write-back.
ept_ad: boolEPT with A/D bits.
invept: boolinvept available.
vpid: boolVPID available.
invvpid_single_context: boolinvvpid variants available.
invvpid_all_context: bool§invvpid_individual_address: bool§unrestricted_guest: boolUnrestricted guest (16 bits without VM86).
apic_register_virt: boolVirtual APIC (register + delivery).
virtual_interrupt_delivery: bool§posted_interrupts: boolPosted interrupts.
pause_loop_exiting: boolExit on pause loop (PLE).
virtualize_x2apic: boolVirtualized x2APIC.
preemption_timer: boolPreemption timer.
virtual_nmis: boolVirtual NMIs.
rdseed: boolrdseed allowed in the guest.
pin_allowed: AllowedControls“Allowed” values (low / high 32 bits) of the control MSRs, after
selecting the TRUE_* MSRs when they exist.
primary_proc_allowed: AllowedControls§secondary_proc_allowed: AllowedControls§exit_allowed: AllowedControls§entry_allowed: AllowedControls§cr0_fixed0: u64Fixed CR0/CR4 masks.
cr0_fixed1: u64§cr4_fixed0: u64§cr4_fixed1: u64Implementations§
Source§impl HwCaps
impl HwCaps
Sourcepub fn from_snapshot(snapshot: &MsrSnapshot, cpuid_vmx: bool) -> Self
pub fn from_snapshot(snapshot: &MsrSnapshot, cpuid_vmx: bool) -> Self
Decodes an MSR snapshot. cpuid_vmx is the result of
CPUID.1:ECX[5]; it is passed separately to keep this module pure.
Trait Implementations§
impl Copy for HwCaps
impl Eq for HwCaps
impl StructuralPartialEq for HwCaps
Auto Trait Implementations§
impl Forget for HwCaps
impl Freeze for HwCaps
impl Move for HwCaps
impl RefUnwindSafe for HwCaps
impl Send for HwCaps
impl Sync for HwCaps
impl Unpin for HwCaps
impl UnsafeUnpin for HwCaps
impl UnwindSafe for HwCaps
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
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
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> ⓘ
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> ⓘ
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