pub struct SynicPortMap { /* private fields */ }Expand description
Registry of message and event ports, keyed by connection ID.
This is the shared state that backs SynicPorts. Store an instance
on the partition inner struct so that both SynicPortAccess consumers
(VMBus, etc.) and hypercall handlers share the same port map.
Hypercall handlers should call SynicPortMap::handle_post_message /
SynicPortMap::handle_signal_event to dispatch guest hypercalls.
Implementations§
Source§impl SynicPortMap
impl SynicPortMap
Sourcepub fn handle_post_message(
&self,
vtl: Vtl,
connection_id: u32,
secure: bool,
message: &[u8],
) -> HvResult<()>
pub fn handle_post_message( &self, vtl: Vtl, connection_id: u32, secure: bool, message: &[u8], ) -> HvResult<()>
Dispatches a guest HvPostMessage hypercall to the registered port.
Sourcepub fn handle_signal_event(
&self,
vtl: Vtl,
connection_id: u32,
flag_number: u16,
) -> HvResult<()>
pub fn handle_signal_event( &self, vtl: Vtl, connection_id: u32, flag_number: u16, ) -> HvResult<()>
Dispatches a guest HvSignalEvent hypercall to the registered port.
Trait Implementations§
Source§impl Debug for SynicPortMap
impl Debug for SynicPortMap
Source§impl Default for SynicPortMap
impl Default for SynicPortMap
Source§fn default() -> SynicPortMap
fn default() -> SynicPortMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SynicPortMap
impl !RefUnwindSafe for SynicPortMap
impl Send for SynicPortMap
impl Sync for SynicPortMap
impl Unpin for SynicPortMap
impl !UnwindSafe for SynicPortMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more