TdispVirtualDeviceInterface

Trait TdispVirtualDeviceInterface 

Source
pub trait TdispVirtualDeviceInterface: Send + Sync {
    // Required methods
    fn send_tdisp_command(
        &self,
        payload: GuestToHostCommand,
    ) -> impl Future<Output = Result<GuestToHostResponse, Error>> + Send;
    fn tdisp_get_device_interface_info(
        &self,
    ) -> impl Future<Output = Result<TdispDeviceInterfaceInfo>> + Send;
    fn tdisp_bind_interface(&self) -> impl Future<Output = Result<()>> + Send;
    fn tdisp_start_device(&self) -> impl Future<Output = Result<()>> + Send;
    fn tdisp_get_device_report(
        &self,
        report_type: &TdispReportType,
    ) -> impl Future<Output = Result<Vec<u8>>> + Send;
    fn tdisp_get_tdi_report(
        &self,
    ) -> impl Future<Output = Result<TdiReportStruct>> + Send;
    fn tdisp_get_tdi_device_id(
        &self,
    ) -> impl Future<Output = Result<u64>> + Send;
    fn tdisp_unbind(
        &self,
        reason: TdispGuestUnbindReason,
    ) -> impl Future<Output = Result<()>> + Send;
}
Expand description

Represents a TDISP device assigned to a guest partition. This trait allows implementations to send TDISP commands to the host through a backing interface such as a VPCI channel.

Required Methods§

Source

fn send_tdisp_command( &self, payload: GuestToHostCommand, ) -> impl Future<Output = Result<GuestToHostResponse, Error>> + Send

Sends a TDISP command to the device through the VPCI channel.

Source

fn tdisp_get_device_interface_info( &self, ) -> impl Future<Output = Result<TdispDeviceInterfaceInfo>> + Send

Get the TDISP interface info for the device.

Source

fn tdisp_bind_interface(&self) -> impl Future<Output = Result<()>> + Send

Bind the device to the current partition and transition to Locked. NOTE: While the device is in the Locked state, it can continue to perform unencrypted operations until it is moved to the Running state. The Locked state is a transitional state that is designed to keep the device from modifying its resources prior to attestation.

Source

fn tdisp_start_device(&self) -> impl Future<Output = Result<()>> + Send

Start a bound device by transitioning it to the Run state from the Locked state. This allows for attestation and for resources to be accepted into the guest context.

Source

fn tdisp_get_device_report( &self, report_type: &TdispReportType, ) -> impl Future<Output = Result<Vec<u8>>> + Send

Request a device report from the TDI or physical device depending on the report type.

Source

fn tdisp_get_tdi_report( &self, ) -> impl Future<Output = Result<TdiReportStruct>> + Send

Request a TDI report from the TDI or physical device.

Source

fn tdisp_get_tdi_device_id(&self) -> impl Future<Output = Result<u64>> + Send

Request the TDI device id from the vpci channel.

Source

fn tdisp_unbind( &self, reason: TdispGuestUnbindReason, ) -> impl Future<Output = Result<()>> + Send

Request to unbind the device and return to the Unlocked state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§