TdispHostStateMachine

Struct TdispHostStateMachine 

Source
pub struct TdispHostStateMachine { /* private fields */ }
Expand description

The state machine for the TDISP assignment flow for a device on the host. Both the guest and host synchronize this state machine with each other as they move through the assignment flow.

Implementations§

Source§

impl TdispHostStateMachine

Source

pub fn new(host_interface: Arc<Mutex<dyn TdispHostDeviceInterface>>) -> Self

Create a new TDISP state machine with the Unlocked state.

Source

pub fn set_debug_device_id(&mut self, debug_device_id: String)

Set the debug device ID string.

Trait Implementations§

Source§

impl TdispGuestRequestInterface for TdispHostStateMachine

Source§

fn tdisp_negotiate_protocol( &mut self, requested_guest_protocol: TdispGuestProtocolType, ) -> Result<TdispDeviceInterfaceInfo, TdispGuestOperationError>

Request versioning and protocol negotiation from the host.

Source§

fn request_lock_device_resources( &mut self, ) -> Result<(), TdispGuestOperationError>

Transition the device from the Unlocked to Locked state. This takes place after the device has been assigned to the guest partition and the resources for the device have been configured by the guest by not yet validated. The device will in the Locked state can still perform unencrypted operations until it has been transitioned to the Run state. The device will be attested and moved to the Run state. Read more
Source§

fn request_start_tdi(&mut self) -> Result<(), TdispGuestOperationError>

Transition the device from the Locked to the Run state. This takes place after the device has been assigned resources and the resources have been locked to the guest. The device will then transition to the Run state, where it will be non-functional until the guest undergoes attestation and resources are accepted into the guest context. Read more
Source§

fn request_attestation_report( &mut self, report_type: TdispReportType, ) -> Result<Vec<u8>, TdispGuestOperationError>

Retrieves the attestation report for the device when the device is in the Locked or Run state. The device resources will not be functional until the resources have been accepted into the guest while the device is in the Run state. Read more
Source§

fn request_unbind( &mut self, reason: TdispGuestUnbindReason, ) -> Result<(), TdispGuestOperationError>

Guest initiates a graceful unbind of the device. The guest might initiate an unbind for a variety of reasons: Read more

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more