TdispHostDeviceInterface

Trait TdispHostDeviceInterface 

Source
pub trait TdispHostDeviceInterface: Send + Sync {
    // Required methods
    fn tdisp_negotiate_protocol(
        &mut self,
        _requested_guest_protocol: TdispGuestProtocolType,
    ) -> Result<TdispDeviceInterfaceInfo>;
    fn tdisp_bind_device(&mut self) -> Result<()>;
    fn tdisp_start_device(&mut self) -> Result<()>;
    fn tdisp_unbind_device(&mut self) -> Result<()>;
    fn tdisp_get_device_report(
        &mut self,
        _report_type: TdispReportType,
    ) -> Result<Vec<u8>>;
}
Expand description

Describes the interface that host software should implement to provide TDISP functionality for a device. These interfaces might dispatch to a physical device, or might be implemented by a software emulator.

Required Methods§

Source

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

Request versioning and protocol negotiation from the host.

Source

fn tdisp_bind_device(&mut self) -> Result<()>

Bind a tdi device to the current partition. Transitions device to the Locked state from Unlocked.

Source

fn tdisp_start_device(&mut self) -> Result<()>

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

Source

fn tdisp_unbind_device(&mut self) -> Result<()>

Unbind a tdi device from the current partition.

Source

fn tdisp_get_device_report( &mut self, _report_type: TdispReportType, ) -> Result<Vec<u8>>

Get a device interface report for the device.

Implementors§