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 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
Trait Implementations§
Source§impl Clone for SevFeatures
impl Clone for SevFeatures
Source§fn clone(&self) -> SevFeatures
fn clone(&self) -> SevFeatures
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Converts to this type from the input type.
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,
Interprets the suffix of the given bytes as a
&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,
Creates an instance of
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,
Creates a
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,
Creates a
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,
Gets the bytes of this value mutably. Read more
§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 = ()
The type of metadata stored in a pointer to
Self
. Read moreSource§impl PartialEq for SevFeatures
impl PartialEq for SevFeatures
Source§impl TryFromBytes for SevFeatureswhere
u64: TryFromBytes,
impl TryFromBytes for SevFeatureswhere
u64: TryFromBytes,
§fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
impl Copy for SevFeatures
impl Eq for SevFeatures
impl Immutable for SevFeatureswhere
u64: Immutable,
impl StructuralPartialEq for SevFeatures
Auto Trait Implementations§
impl Freeze for SevFeatures
impl RefUnwindSafe for SevFeatures
impl Send for SevFeatures
impl Sync for SevFeatures
impl Unpin for SevFeatures
impl UnwindSafe for SevFeatures
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