vmcore::synic

Trait GuestMessagePort

Source
pub trait GuestMessagePort:
    Send
    + Sync
    + Inspect {
    // Required methods
    fn poll_post_message(
        &mut self,
        cx: &mut Context<'_>,
        typ: u32,
        payload: &[u8],
    ) -> Poll<()>;
    fn set_target_vp(&mut self, vp: u32) -> Result<(), HypervisorError>;
}
Expand description

A guest message port, created by SynicPortAccess::new_guest_message_port.

Required Methods§

Source

fn poll_post_message( &mut self, cx: &mut Context<'_>, typ: u32, payload: &[u8], ) -> Poll<()>

Posts a message to the guest.

It is the caller’s responsibility to not queue too many messages. Not all transport layers are guaranteed to support backpressure.

Source

fn set_target_vp(&mut self, vp: u32) -> Result<(), HypervisorError>

Changes the virtual processor to which messages are sent.

Implementors§