vbs_defs

Struct VbsChunkHeader

Source
#[repr(C)]
pub struct VbsChunkHeader { pub byte_count: u32, pub chunk_type: BootMeasurementType, pub reserved: u64, }
Expand description

Chunk that is measured to generate digest. These consist of a 16 byte header followed by data. This needs c style alignment to generate a consistent measurement. Defined by the following struct in C:

typedef struct _VBS_VM_BOOT_MEASUREMENT_CHUNK
{
    UINT32 ByteCount;
    VBS_VM_BOOT_MEASUREMENT_CHUNK_TYPE Type;
    UINT64 Reserved;

    union
    {
        VBS_VM_BOOT_MEASUREMENT_CHUNK_VP_REGISTER VpRegister;
        VBS_VM_BOOT_MEASUREMENT_CHUNK_VP_VTL_ENABLED VpVtlEnabled;
        VBS_VM_BOOT_MEASUREMENT_CHUNK_GPA_PAGE GpaPage;
    } u;
} VBS_VM_BOOT_MEASUREMENT_CHUNK, *PVBS_VM_BOOT_MEASUREMENT_CHUNK;

Structure describing the chunk to be measured

Fields§

§byte_count: u32

The full size to be measured

§chunk_type: BootMeasurementType§reserved: u64

Trait Implementations§

Source§

impl IntoBytes for VbsChunkHeader
where u32: IntoBytes, BootMeasurementType: IntoBytes, u64: IntoBytes, (): PaddingFree<Self, { _ }>,

§

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

Gets the bytes of this value. 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 VbsChunkHeader
where u64: KnownLayout,

Source§

type PointerMetadata = <u64 as KnownLayout>::PointerMetadata

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

impl Immutable for VbsChunkHeader
where u32: Immutable, BootMeasurementType: Immutable, u64: Immutable,

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> 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, 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.