x86defs::snp

Struct SevVmsa

Source
#[repr(C)]
pub struct SevVmsa {
Show 106 fields pub es: SevSelector, pub cs: SevSelector, pub ss: SevSelector, pub ds: SevSelector, pub fs: SevSelector, pub gs: SevSelector, pub gdtr: SevSelector, pub ldtr: SevSelector, pub idtr: SevSelector, pub tr: SevSelector, pub pl0_ssp: u64, pub pl1_ssp: u64, pub pl2_ssp: u64, pub pl3_ssp: u64, pub u_cet: u64, pub vmsa_reserved1: [u8; 2], pub vmpl: u8, pub cpl: u8, pub vmsa_reserved2: u32, pub efer: u64, pub vmsa_reserved3: [u32; 26], pub xss: u64, pub cr4: u64, pub cr3: u64, pub cr0: u64, pub dr7: u64, pub dr6: u64, pub rflags: u64, pub rip: u64, pub dr0: u64, pub dr1: u64, pub dr2: u64, pub dr3: u64, pub dr0_addr_mask: u64, pub dr1_addr_mask: u64, pub dr2_addr_mask: u64, pub dr3_addr_mask: u64, pub vmsa_reserved4: [u64; 3], pub rsp: u64, pub s_cet: u64, pub ssp: u64, pub interrupt_ssp_table_addr: u64, pub rax: u64, pub star: u64, pub lstar: u64, pub cstar: u64, pub sfmask: u64, pub kernel_gs_base: u64, pub sysenter_cs: u64, pub sysenter_esp: u64, pub sysenter_eip: u64, pub cr2: u64, pub vmsa_reserved5: [u64; 4], pub pat: u64, pub dbgctl: u64, pub last_branch_from_ip: u64, pub last_branch_to_ip: u64, pub last_excp_from_ip: u64, pub last_excp_to_ip: u64, pub vmsa_reserved6: [u64; 9], pub spec_ctrl: u64, pub pkru: u32, pub tsc_aux: u32, pub vmsa_reserved7: [u32; 4], pub register_protection_nonce: u64, pub rcx: u64, pub rdx: u64, pub rbx: u64, pub vmsa_reserved8: u64, pub rbp: u64, pub rsi: u64, pub rdi: u64, pub r8: u64, pub r9: u64, pub r10: u64, pub r11: u64, pub r12: u64, pub r13: u64, pub r14: u64, pub r15: u64, pub vmsa_reserved9: [u64; 2], pub exit_info1: u64, pub exit_info2: u64, pub exit_int_info: u64, pub next_rip: u64, pub sev_features: SevFeatures, pub v_intr_cntrl: SevVirtualInterruptControl, pub guest_error_code: u64, pub virtual_tom: u64, pub tlb_id: u64, pub pcpu_id: u64, pub event_inject: SevEventInjectInfo, pub xcr0: u64, pub xsave_valid_bitmap: [u8; 16], pub x87dp: u64, pub mxcsr: u32, pub x87_ftw: u16, pub x87_fsw: u16, pub x87_fcw: u16, pub x87_op: u16, pub x87_ds: u16, pub x87_cs: u16, pub x87_rip: u64, pub x87_registers: [u64; 10], pub xmm_registers: [SevXmmRegister; 16], pub ymm_registers: [SevXmmRegister; 16],
}
Expand description

SEV VMSA structure representing CPU state

Fields§

§es: SevSelector§cs: SevSelector§ss: SevSelector§ds: SevSelector§fs: SevSelector§gs: SevSelector§gdtr: SevSelector§ldtr: SevSelector§idtr: SevSelector§tr: SevSelector§pl0_ssp: u64§pl1_ssp: u64§pl2_ssp: u64§pl3_ssp: u64§u_cet: u64§vmsa_reserved1: [u8; 2]§vmpl: u8§cpl: u8§vmsa_reserved2: u32§efer: u64§vmsa_reserved3: [u32; 26]§xss: u64§cr4: u64§cr3: u64§cr0: u64§dr7: u64§dr6: u64§rflags: u64§rip: u64§dr0: u64§dr1: u64§dr2: u64§dr3: u64§dr0_addr_mask: u64§dr1_addr_mask: u64§dr2_addr_mask: u64§dr3_addr_mask: u64§vmsa_reserved4: [u64; 3]§rsp: u64§s_cet: u64§ssp: u64§interrupt_ssp_table_addr: u64§rax: u64§star: u64§lstar: u64§cstar: u64§sfmask: u64§kernel_gs_base: u64§sysenter_cs: u64§sysenter_esp: u64§sysenter_eip: u64§cr2: u64§vmsa_reserved5: [u64; 4]§pat: u64§dbgctl: u64§last_branch_from_ip: u64§last_branch_to_ip: u64§last_excp_from_ip: u64§last_excp_to_ip: u64§vmsa_reserved6: [u64; 9]§spec_ctrl: u64§pkru: u32§tsc_aux: u32§vmsa_reserved7: [u32; 4]§register_protection_nonce: u64§rcx: u64§rdx: u64§rbx: u64§vmsa_reserved8: u64§rbp: u64§rsi: u64§rdi: u64§r8: u64§r9: u64§r10: u64§r11: u64§r12: u64§r13: u64§r14: u64§r15: u64§vmsa_reserved9: [u64; 2]§exit_info1: u64§exit_info2: u64§exit_int_info: u64§next_rip: u64§sev_features: SevFeatures§v_intr_cntrl: SevVirtualInterruptControl§guest_error_code: u64§virtual_tom: u64§tlb_id: u64§pcpu_id: u64§event_inject: SevEventInjectInfo§xcr0: u64§xsave_valid_bitmap: [u8; 16]§x87dp: u64§mxcsr: u32§x87_ftw: u16§x87_fsw: u16§x87_fcw: u16§x87_op: u16§x87_ds: u16§x87_cs: u16§x87_rip: u64§x87_registers: [u64; 10]§xmm_registers: [SevXmmRegister; 16]§ymm_registers: [SevXmmRegister; 16]

Trait Implementations§

Source§

impl Clone for SevVmsa

Source§

fn clone(&self) -> SevVmsa

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SevVmsa

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromBytes for SevVmsa
where SevSelector: FromBytes, u64: FromBytes, [u8; 2]: FromBytes, u8: FromBytes, u32: FromBytes, [u32; 26]: FromBytes, [u64; 3]: FromBytes, [u64; 4]: FromBytes, [u64; 9]: FromBytes, [u32; 4]: FromBytes, [u64; 2]: FromBytes, SevFeatures: FromBytes, SevVirtualInterruptControl: FromBytes, SevEventInjectInfo: FromBytes, [u8; 16]: FromBytes, u16: FromBytes, [u64; 10]: FromBytes, [SevXmmRegister; 16]: FromBytes,

§

fn ref_from_bytes( source: &[u8], ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout + Immutable,

Interprets the given source as a &Self. Read more
§

fn ref_from_prefix( source: &[u8], ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout + Immutable,

Interprets the prefix of the given source as a &Self without copying. Read more
§

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,

Interprets the given source as a &mut Self. Read more
§

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,

Interprets the prefix of the given source as a &mut Self without copying. Read more
§

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,

Interprets the suffix of the given source as a &mut Self without copying. Read more
§

fn ref_from_bytes_with_elems( source: &[u8], count: usize, ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the given source as a &Self with a DST length equal to count. Read more
§

fn ref_from_prefix_with_elems( source: &[u8], count: usize, ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the prefix of the given source as a DST &Self with length equal to count. Read more
§

fn ref_from_suffix_with_elems( source: &[u8], count: usize, ) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the suffix of the given source as a DST &Self with length equal to count. Read more
§

fn mut_from_bytes_with_elems( source: &mut [u8], count: usize, ) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the given source as a &mut Self with a DST length equal to count. Read more
§

fn mut_from_prefix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout<PointerMetadata = usize>,

Interprets the prefix of the given source as a &mut Self with DST length equal to count. Read more
§

fn mut_from_suffix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where Self: IntoBytes + KnownLayout<PointerMetadata = usize>,

Interprets the suffix of the given source as a &mut Self with DST length equal to count. Read more
§

fn read_from_bytes(source: &[u8]) -> Result<Self, SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the given source. Read more
§

fn read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the prefix of the given source. Read more
§

fn read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), SizeError<&[u8], Self>>
where Self: Sized,

Reads a copy of Self from the suffix of the given source. Read more
Source§

impl FromZeros for SevVmsa
where SevSelector: FromZeros, u64: FromZeros, [u8; 2]: FromZeros, u8: FromZeros, u32: FromZeros, [u32; 26]: FromZeros, [u64; 3]: FromZeros, [u64; 4]: FromZeros, [u64; 9]: FromZeros, [u32; 4]: FromZeros, [u64; 2]: FromZeros, SevFeatures: FromZeros, SevVirtualInterruptControl: FromZeros, SevEventInjectInfo: FromZeros, [u8; 16]: FromZeros, u16: FromZeros, [u64; 10]: FromZeros, [SevXmmRegister; 16]: FromZeros,

§

fn zero(&mut self)

Overwrites self with zeros. Read more
§

fn new_zeroed() -> Self
where Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
§

fn new_box_zeroed() -> Result<Box<Self>, AllocError>
where Self: Sized,

Creates a Box<Self> from zeroed bytes. Read more
§

fn new_box_zeroed_with_elems(count: usize) -> Result<Box<Self>, AllocError>
where Self: KnownLayout<PointerMetadata = usize>,

Creates a Box<[Self]> (a boxed slice) from zeroed bytes. Read more
§

fn new_vec_zeroed(len: usize) -> Result<Vec<Self>, AllocError>
where Self: Sized,

Creates a Vec<Self> from zeroed bytes. Read more
§

fn extend_vec_zeroed( v: &mut Vec<Self>, additional: usize, ) -> Result<(), AllocError>
where Self: Sized,

Extends a Vec<Self> by pushing additional new items onto the end of the vector. The new items are initialized with zeros.
§

fn insert_vec_zeroed( v: &mut Vec<Self>, position: usize, additional: usize, ) -> Result<(), AllocError>
where Self: Sized,

Inserts additional new items into Vec<Self> at position. The new items are initialized with zeros. Read more
Source§

impl IntoBytes for SevVmsa
where SevSelector: IntoBytes, u64: IntoBytes, [u8; 2]: IntoBytes, u8: IntoBytes, u32: IntoBytes, [u32; 26]: IntoBytes, [u64; 3]: IntoBytes, [u64; 4]: IntoBytes, [u64; 9]: IntoBytes, [u32; 4]: IntoBytes, [u64; 2]: IntoBytes, SevFeatures: IntoBytes, SevVirtualInterruptControl: IntoBytes, SevEventInjectInfo: IntoBytes, [u8; 16]: IntoBytes, u16: IntoBytes, [u64; 10]: IntoBytes, [SevXmmRegister; 16]: IntoBytes, (): PaddingFree<Self, { _ }>,

§

fn as_bytes(&self) -> &[u8]
where Self: Immutable,

Gets the bytes of this value. Read more
§

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,

Writes a copy of self to dst. Read more
§

fn write_to_prefix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the prefix of dst. Read more
§

fn write_to_suffix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the suffix of dst. Read more
Source§

impl KnownLayout for SevVmsa
where [SevXmmRegister; 16]: KnownLayout,

Source§

type PointerMetadata = <[SevXmmRegister; 16] as KnownLayout>::PointerMetadata

The type of metadata stored in a pointer to Self. Read more
Source§

impl PartialEq for SevVmsa

Source§

fn eq(&self, other: &SevVmsa) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFromBytes for SevVmsa
where SevSelector: TryFromBytes, u64: TryFromBytes, [u8; 2]: TryFromBytes, u8: TryFromBytes, u32: TryFromBytes, [u32; 26]: TryFromBytes, [u64; 3]: TryFromBytes, [u64; 4]: TryFromBytes, [u64; 9]: TryFromBytes, [u32; 4]: TryFromBytes, [u64; 2]: TryFromBytes, SevFeatures: TryFromBytes, SevVirtualInterruptControl: TryFromBytes, SevEventInjectInfo: TryFromBytes, [u8; 16]: TryFromBytes, u16: TryFromBytes, [u64; 10]: TryFromBytes, [SevXmmRegister; 16]: TryFromBytes,

§

fn try_ref_from_bytes( source: &[u8], ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the given source as a &Self. Read more
§

fn try_ref_from_prefix( source: &[u8], ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the prefix of the given source as a &Self. Read more
§

fn try_ref_from_suffix( source: &[u8], ) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout + Immutable,

Attempts to interpret the suffix of the given source as a &Self. Read more
§

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,

Attempts to interpret the given source as a &mut Self without copying. Read more
§

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,

Attempts to interpret the prefix of the given source as a &mut Self. Read more
§

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,

Attempts to interpret the suffix of the given source as a &mut Self. Read more
§

fn try_ref_from_bytes_with_elems( source: &[u8], count: usize, ) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the given source as a &Self with a DST length equal to count. Read more
§

fn try_ref_from_prefix_with_elems( source: &[u8], count: usize, ) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the prefix of the given source as a &Self with a DST length equal to count. Read more
§

fn try_ref_from_suffix_with_elems( source: &[u8], count: usize, ) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the suffix of the given source as a &Self with a DST length equal to count. Read more
§

fn try_mut_from_bytes_with_elems( source: &mut [u8], count: usize, ) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize>,

Attempts to interpret the given source as a &mut Self with a DST length equal to count. Read more
§

fn try_mut_from_prefix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize>,

Attempts to interpret the prefix of the given source as a &mut Self with a DST length equal to count. Read more
§

fn try_mut_from_suffix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where Self: KnownLayout<PointerMetadata = usize>,

Attempts to interpret the suffix of the given source as a &mut Self with a DST length equal to count. Read more
§

fn try_read_from_bytes( source: &[u8], ) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read the given source as a Self. Read more
§

fn try_read_from_prefix( source: &[u8], ) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the prefix of the given source. Read more
§

fn try_read_from_suffix( source: &[u8], ) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where Self: Sized,

Attempts to read a Self from the suffix of the given source. Read more
Source§

impl Eq for SevVmsa

Source§

impl Immutable for SevVmsa
where SevSelector: Immutable, u64: Immutable, [u8; 2]: Immutable, u8: Immutable, u32: Immutable, [u32; 26]: Immutable, [u64; 3]: Immutable, [u64; 4]: Immutable, [u64; 9]: Immutable, [u32; 4]: Immutable, [u64; 2]: Immutable, SevFeatures: Immutable, SevVirtualInterruptControl: Immutable, SevEventInjectInfo: Immutable, [u8; 16]: Immutable, u16: Immutable, [u64; 10]: Immutable, [SevXmmRegister; 16]: Immutable,

Source§

impl StructuralPartialEq for SevVmsa

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.