Trait virt::Synic

source ·
pub trait Synic: Send + Sync {
    // Required methods
    fn post_message(
        &self,
        vtl: Vtl,
        vp: VpIndex,
        sint: u8,
        typ: u32,
        payload: &[u8],
    );
    fn new_guest_event_port(&self) -> Box<dyn GuestEventPort>;
    fn prefer_os_events(&self) -> bool;

    // Provided methods
    fn new_host_event_port(
        &self,
        connection_id: u32,
        minimum_vtl: Vtl,
        event: &Event,
    ) -> Result<Option<Box<dyn Sync + Send>>, Error> { ... }
    fn monitor_support(&self) -> Option<&dyn SynicMonitor> { ... }
}

Required Methods§

source

fn post_message( &self, vtl: Vtl, vp: VpIndex, sint: u8, typ: u32, payload: &[u8], )

Posts a message to the guest.

source

fn new_guest_event_port(&self) -> Box<dyn GuestEventPort>

Creates a GuestEventPort for signaling VMBus channels in the guest.

source

fn prefer_os_events(&self) -> bool

Returns whether callers should pass an OS event when creating event ports, as opposed to passing a function to call.

This is true when the hypervisor can more quickly dispatch an OS event and resume the VP than it can take an intercept into user mode and call a function.

Provided Methods§

source

fn new_host_event_port( &self, connection_id: u32, minimum_vtl: Vtl, event: &Event, ) -> Result<Option<Box<dyn Sync + Send>>, Error>

Adds a fast path to signal event when the guest signals connection_id from VTL >= minimum_vtl.

Returns Ok(None) if this acceleration is not supported.

source

fn monitor_support(&self) -> Option<&dyn SynicMonitor>

Returns an object for manipulating the monitor page, or None if monitor pages aren’t supported.

Implementors§