Skip to main content

Launcher

Struct Launcher 

Source
pub struct Launcher<T, U: AsRawFd, V: AsRawFd> { /* private fields */ }
Expand description

Facilitates the correct execution of the CSV launch process.

Implementations§

Source§

impl<T, U: AsRawFd, V: AsRawFd> Launcher<T, U, V>

Source

pub fn as_mut_vmfd(&mut self) -> &mut U

Give access to the vm fd to create vCPUs or such.

Source§

impl<U: AsRawFd, V: AsRawFd> Launcher<New, U, V>

Source

pub fn new(kvm: U, csv: V) -> Result<Self>

Begin the CSV launch process.

Source

pub fn new_es(kvm: U, csv: V) -> Result<Self>

Begin the CSV2 launch process.

Source

pub fn start(self, start: Start) -> Result<Launcher<Started, U, V>>

Create an encrypted guest context.

Source

pub fn start_raw( self, policy: &Policy, cert: &Certificate, session: &Session, ) -> Result<Launcher<Started, U, V>>

Create an encrypted guest context.

Source

pub fn start_with_policy_only( self, policy: Policy, ) -> Result<Launcher<Started, U, V>>

Create an encrypted guest context.

Source§

impl<U: AsRawFd, V: AsRawFd> Launcher<Started, U, V>

Source

pub fn update_data(&mut self, data: &[u8]) -> Result<()>

Encrypt guest data with its VEK.

Source

pub fn register_kvm_enc_region(&mut self, data: &[u8]) -> Result<()>

Register the encrypted memory region to a virtual machine. Corresponds to the KVM_MEMORY_ENCRYPT_REG_REGION ioctl.

Source

pub fn update_data_without_registration(&mut self, data: &[u8]) -> Result<()>

Encrypt guest data with its VEK, while the KVM encrypted memory region is not registered.

Source

pub fn update_vmsa(&mut self) -> Result<()>

Encrypt the VMSA on CSV2.

Source

pub fn measure(self) -> Result<Launcher<Measured, U, V>>

Request a measurement from the CSV firmware.

Source§

impl<U: AsRawFd, V: AsRawFd> Launcher<Measured, U, V>

Source

pub fn measurement(&self) -> Measurement

Get the measurement that the CSV platform recorded.

Source

pub fn get_attestation_report( &mut self, mnonce: [u8; 16], ) -> Result<Box<AttestationReport>>

Get the attestation report.

Source

pub fn inject(&mut self, secret: &Secret, guest: usize) -> Result<()>

Inject a secret into the guest.

§Remarks

This should only be called after a successful attestation flow.

Source

pub fn finish(self) -> Result<Handle>

Complete the CSV launch process.

Auto Trait Implementations§

§

impl<T, U, V> Freeze for Launcher<T, U, V>
where T: Freeze, U: Freeze, V: Freeze,

§

impl<T, U, V> RefUnwindSafe for Launcher<T, U, V>

§

impl<T, U, V> Send for Launcher<T, U, V>
where T: Send, U: Send, V: Send,

§

impl<T, U, V> Sync for Launcher<T, U, V>
where T: Sync, U: Sync, V: Sync,

§

impl<T, U, V> Unpin for Launcher<T, U, V>
where T: Unpin, U: Unpin, V: Unpin,

§

impl<T, U, V> UnsafeUnpin for Launcher<T, U, V>

§

impl<T, U, V> UnwindSafe for Launcher<T, U, V>
where T: UnwindSafe, U: UnwindSafe, V: UnwindSafe,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,