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
impl TdispHostStateMachine
Sourcepub fn new(host_interface: Arc<Mutex<dyn TdispHostDeviceInterface>>) -> Self
pub fn new(host_interface: Arc<Mutex<dyn TdispHostDeviceInterface>>) -> Self
Create a new TDISP state machine with the Unlocked state.
Sourcepub fn set_debug_device_id(&mut self, debug_device_id: String)
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
impl TdispGuestRequestInterface for TdispHostStateMachine
Source§fn tdisp_negotiate_protocol(
&mut self,
requested_guest_protocol: TdispGuestProtocolType,
) -> Result<TdispDeviceInterfaceInfo, TdispGuestOperationError>
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>
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 moreSource§fn request_start_tdi(&mut self) -> Result<(), TdispGuestOperationError>
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 moreSource§fn request_attestation_report(
&mut self,
report_type: TdispReportType,
) -> Result<Vec<u8>, TdispGuestOperationError>
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 moreSource§fn request_unbind(
&mut self,
reason: TdispGuestUnbindReason,
) -> Result<(), TdispGuestOperationError>
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§
impl Freeze for TdispHostStateMachine
impl !RefUnwindSafe for TdispHostStateMachine
impl Send for TdispHostStateMachine
impl Sync for TdispHostStateMachine
impl Unpin for TdispHostStateMachine
impl !UnwindSafe for TdispHostStateMachine
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