pub struct SevFeatures(/* private fields */);Implementations§
Source§impl SevFeatures
impl SevFeatures
Sourcepub const fn with_snp_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_snp_checked(self, value: bool) -> Result<Self, ()>
Bits: 0..1
Sourcepub const fn with_vtom_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_vtom_checked(self, value: bool) -> Result<Self, ()>
Bits: 1..2
Sourcepub const fn reflect_vc(&self) -> bool
pub const fn reflect_vc(&self) -> bool
Bits: 2..3
Sourcepub const fn with_reflect_vc_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_reflect_vc_checked(self, value: bool) -> Result<Self, ()>
Bits: 2..3
Sourcepub const fn with_reflect_vc(self, value: bool) -> Self
pub const fn with_reflect_vc(self, value: bool) -> Self
Bits: 2..3
Sourcepub const fn set_reflect_vc(&mut self, value: bool)
pub const fn set_reflect_vc(&mut self, value: bool)
Bits: 2..3
Sourcepub const fn restrict_injection(&self) -> bool
pub const fn restrict_injection(&self) -> bool
Bits: 3..4
Sourcepub const fn with_restrict_injection_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_restrict_injection_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 3..4
Sourcepub const fn with_restrict_injection(self, value: bool) -> Self
pub const fn with_restrict_injection(self, value: bool) -> Self
Bits: 3..4
Sourcepub const fn set_restrict_injection(&mut self, value: bool)
pub const fn set_restrict_injection(&mut self, value: bool)
Bits: 3..4
Sourcepub const fn set_restrict_injection_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_restrict_injection_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 3..4
Sourcepub const fn alternate_injection(&self) -> bool
pub const fn alternate_injection(&self) -> bool
Bits: 4..5
Sourcepub const fn with_alternate_injection_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_alternate_injection_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 4..5
Sourcepub const fn with_alternate_injection(self, value: bool) -> Self
pub const fn with_alternate_injection(self, value: bool) -> Self
Bits: 4..5
Sourcepub const fn set_alternate_injection(&mut self, value: bool)
pub const fn set_alternate_injection(&mut self, value: bool)
Bits: 4..5
Sourcepub const fn set_alternate_injection_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_alternate_injection_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 4..5
Sourcepub const fn debug_swap(&self) -> bool
pub const fn debug_swap(&self) -> bool
Bits: 5..6
Sourcepub const fn with_debug_swap_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_debug_swap_checked(self, value: bool) -> Result<Self, ()>
Bits: 5..6
Sourcepub const fn with_debug_swap(self, value: bool) -> Self
pub const fn with_debug_swap(self, value: bool) -> Self
Bits: 5..6
Sourcepub const fn set_debug_swap(&mut self, value: bool)
pub const fn set_debug_swap(&mut self, value: bool)
Bits: 5..6
Sourcepub const fn prevent_host_ibs(&self) -> bool
pub const fn prevent_host_ibs(&self) -> bool
Bits: 6..7
Sourcepub const fn with_prevent_host_ibs_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_prevent_host_ibs_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 6..7
Sourcepub const fn with_prevent_host_ibs(self, value: bool) -> Self
pub const fn with_prevent_host_ibs(self, value: bool) -> Self
Bits: 6..7
Sourcepub const fn set_prevent_host_ibs(&mut self, value: bool)
pub const fn set_prevent_host_ibs(&mut self, value: bool)
Bits: 6..7
Sourcepub const fn set_prevent_host_ibs_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_prevent_host_ibs_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 6..7
Sourcepub const fn snp_btb_isolation(&self) -> bool
pub const fn snp_btb_isolation(&self) -> bool
Bits: 7..8
Sourcepub const fn with_snp_btb_isolation_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_snp_btb_isolation_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 7..8
Sourcepub const fn with_snp_btb_isolation(self, value: bool) -> Self
pub const fn with_snp_btb_isolation(self, value: bool) -> Self
Bits: 7..8
Sourcepub const fn set_snp_btb_isolation(&mut self, value: bool)
pub const fn set_snp_btb_isolation(&mut self, value: bool)
Bits: 7..8
Sourcepub const fn set_snp_btb_isolation_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_snp_btb_isolation_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 7..8
Sourcepub const fn with_vmpl_isss_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_vmpl_isss_checked(self, value: bool) -> Result<Self, ()>
Bits: 8..9
Sourcepub const fn with_vmpl_isss(self, value: bool) -> Self
pub const fn with_vmpl_isss(self, value: bool) -> Self
Bits: 8..9
Sourcepub const fn set_vmpl_isss(&mut self, value: bool)
pub const fn set_vmpl_isss(&mut self, value: bool)
Bits: 8..9
Sourcepub const fn secure_tsc(&self) -> bool
pub const fn secure_tsc(&self) -> bool
Bits: 9..10
Sourcepub const fn with_secure_tsc_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_secure_tsc_checked(self, value: bool) -> Result<Self, ()>
Bits: 9..10
Sourcepub const fn with_secure_tsc(self, value: bool) -> Self
pub const fn with_secure_tsc(self, value: bool) -> Self
Bits: 9..10
Sourcepub const fn set_secure_tsc(&mut self, value: bool)
pub const fn set_secure_tsc(&mut self, value: bool)
Bits: 9..10
Sourcepub const fn vmgexit_param(&self) -> bool
pub const fn vmgexit_param(&self) -> bool
Bits: 10..11
Sourcepub const fn with_vmgexit_param_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_vmgexit_param_checked(self, value: bool) -> Result<Self, ()>
Bits: 10..11
Sourcepub const fn with_vmgexit_param(self, value: bool) -> Self
pub const fn with_vmgexit_param(self, value: bool) -> Self
Bits: 10..11
Sourcepub const fn set_vmgexit_param(&mut self, value: bool)
pub const fn set_vmgexit_param(&mut self, value: bool)
Bits: 10..11
Sourcepub const fn with_pmc_virt_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_pmc_virt_checked(self, value: bool) -> Result<Self, ()>
Bits: 11..12
Sourcepub const fn with_pmc_virt(self, value: bool) -> Self
pub const fn with_pmc_virt(self, value: bool) -> Self
Bits: 11..12
Sourcepub const fn set_pmc_virt(&mut self, value: bool)
pub const fn set_pmc_virt(&mut self, value: bool)
Bits: 11..12
Sourcepub const fn with_ibs_virt_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_ibs_virt_checked(self, value: bool) -> Result<Self, ()>
Bits: 12..13
Sourcepub const fn with_ibs_virt(self, value: bool) -> Self
pub const fn with_ibs_virt(self, value: bool) -> Self
Bits: 12..13
Sourcepub const fn set_ibs_virt(&mut self, value: bool)
pub const fn set_ibs_virt(&mut self, value: bool)
Bits: 12..13
Sourcepub const fn guest_intercept_control(&self) -> bool
pub const fn guest_intercept_control(&self) -> bool
Bits: 13..14
Sourcepub const fn with_guest_intercept_control_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_guest_intercept_control_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 13..14
Sourcepub const fn with_guest_intercept_control(self, value: bool) -> Self
pub const fn with_guest_intercept_control(self, value: bool) -> Self
Bits: 13..14
Sourcepub const fn set_guest_intercept_control(&mut self, value: bool)
pub const fn set_guest_intercept_control(&mut self, value: bool)
Bits: 13..14
Sourcepub const fn set_guest_intercept_control_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_guest_intercept_control_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 13..14
Sourcepub const fn vmsa_reg_prot(&self) -> bool
pub const fn vmsa_reg_prot(&self) -> bool
Bits: 14..15
Sourcepub const fn with_vmsa_reg_prot_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_vmsa_reg_prot_checked(self, value: bool) -> Result<Self, ()>
Bits: 14..15
Sourcepub const fn with_vmsa_reg_prot(self, value: bool) -> Self
pub const fn with_vmsa_reg_prot(self, value: bool) -> Self
Bits: 14..15
Sourcepub const fn set_vmsa_reg_prot(&mut self, value: bool)
pub const fn set_vmsa_reg_prot(&mut self, value: bool)
Bits: 14..15
Sourcepub const fn with_smt_prot_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_smt_prot_checked(self, value: bool) -> Result<Self, ()>
Bits: 15..16
Sourcepub const fn with_smt_prot(self, value: bool) -> Self
pub const fn with_smt_prot(self, value: bool) -> Self
Bits: 15..16
Sourcepub const fn set_smt_prot(&mut self, value: bool)
pub const fn set_smt_prot(&mut self, value: bool)
Bits: 15..16
Sourcepub const fn secure_avic(&self) -> bool
pub const fn secure_avic(&self) -> bool
Bits: 16..17
Sourcepub const fn with_secure_avic_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_secure_avic_checked(self, value: bool) -> Result<Self, ()>
Bits: 16..17
Sourcepub const fn with_secure_avic(self, value: bool) -> Self
pub const fn with_secure_avic(self, value: bool) -> Self
Bits: 16..17
Sourcepub const fn set_secure_avic(&mut self, value: bool)
pub const fn set_secure_avic(&mut self, value: bool)
Bits: 16..17
Sourcepub const fn ibpb_on_entry(&self) -> bool
pub const fn ibpb_on_entry(&self) -> bool
Bits: 21..22
Sourcepub const fn with_ibpb_on_entry_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_ibpb_on_entry_checked(self, value: bool) -> Result<Self, ()>
Bits: 21..22
Sourcepub const fn with_ibpb_on_entry(self, value: bool) -> Self
pub const fn with_ibpb_on_entry(self, value: bool) -> Self
Bits: 21..22
Sourcepub const fn set_ibpb_on_entry(&mut self, value: bool)
pub const fn set_ibpb_on_entry(&mut self, value: bool)
Bits: 21..22
Sourcepub const fn allowed_sev_features_enable(&self) -> bool
pub const fn allowed_sev_features_enable(&self) -> bool
Bits: 63..64
Sourcepub const fn with_allowed_sev_features_enable_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_allowed_sev_features_enable_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 63..64
Sourcepub const fn with_allowed_sev_features_enable(self, value: bool) -> Self
pub const fn with_allowed_sev_features_enable(self, value: bool) -> Self
Bits: 63..64
Sourcepub const fn set_allowed_sev_features_enable(&mut self, value: bool)
pub const fn set_allowed_sev_features_enable(&mut self, value: bool)
Bits: 63..64
Trait Implementations§
Source§impl Clone for SevFeatures
impl Clone for SevFeatures
Source§fn clone(&self) -> SevFeatures
fn clone(&self) -> SevFeatures
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SevFeatures
impl Debug for SevFeatures
Source§impl Default for SevFeatures
impl Default for SevFeatures
Source§impl From<SevFeatures> for u64
impl From<SevFeatures> for u64
Source§fn from(v: SevFeatures) -> u64
fn from(v: SevFeatures) -> u64
Source§impl From<u64> for SevFeatures
impl From<u64> for SevFeatures
Source§impl FromBytes for SevFeatureswhere
u64: FromBytes,
impl FromBytes for SevFeatureswhere
u64: FromBytes,
§fn ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
&Self. Read more§fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
Source§impl FromZeros for SevFeatureswhere
u64: FromZeros,
impl FromZeros for SevFeatureswhere
u64: FromZeros,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere
Self: Sized,
Self from zeroed bytes. Read more§fn new_box_zeroed() -> Result<Box<Self>, AllocError>where
Self: Sized,
fn new_box_zeroed() -> Result<Box<Self>, AllocError>where
Self: Sized,
Box<Self> from zeroed bytes. Read more§fn new_vec_zeroed(len: usize) -> Result<Vec<Self>, AllocError>where
Self: Sized,
fn new_vec_zeroed(len: usize) -> Result<Vec<Self>, AllocError>where
Self: Sized,
Vec<Self> from zeroed bytes. Read moreSource§impl IntoBytes for SevFeatureswhere
u64: IntoBytes,
impl IntoBytes for SevFeatureswhere
u64: IntoBytes,
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
Source§impl KnownLayout for SevFeatureswhere
Self: Sized,
impl KnownLayout for SevFeatureswhere
Self: Sized,
Source§type PointerMetadata = ()
type PointerMetadata = ()
Self. Read more§fn size_for_metadata(meta: Self::PointerMetadata) -> Option<usize>
fn size_for_metadata(meta: Self::PointerMetadata) -> Option<usize>
Self with the given pointer
metadata. Read more