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§
sourcefn post_message(
&self,
vtl: Vtl,
vp: VpIndex,
sint: u8,
typ: u32,
payload: &[u8],
)
fn post_message( &self, vtl: Vtl, vp: VpIndex, sint: u8, typ: u32, payload: &[u8], )
Posts a message to the guest.
sourcefn new_guest_event_port(&self) -> Box<dyn GuestEventPort>
fn new_guest_event_port(&self) -> Box<dyn GuestEventPort>
Creates a [GuestEventPort
] for signaling VMBus channels in the guest.
sourcefn prefer_os_events(&self) -> bool
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§
sourcefn new_host_event_port(
&self,
connection_id: u32,
minimum_vtl: Vtl,
event: &Event,
) -> Result<Option<Box<dyn Sync + Send>>, Error>
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.
sourcefn monitor_support(&self) -> Option<&dyn SynicMonitor>
fn monitor_support(&self) -> Option<&dyn SynicMonitor>
Returns an object for manipulating the monitor page, or None if monitor pages aren’t supported.