Trait SynicMonitor

Source
pub trait SynicMonitor: Synic {
    // Required methods
    fn register_monitor(
        &self,
        monitor_id: MonitorId,
        connection_id: u32,
    ) -> Box<dyn Sync + Send>;
    fn set_monitor_page(&self, vtl: Vtl, gpa: Option<u64>) -> Result<()>;

    // Provided method
    fn allocate_monitor_page(&self, vtl: Vtl) -> Result<Option<u64>> { ... }
}
Expand description

Provides monitor page functionality for a Synic implementation.

Required Methods§

Source

fn register_monitor( &self, monitor_id: MonitorId, connection_id: u32, ) -> Box<dyn Sync + Send>

Registers a monitored interrupt. The returned struct will unregister the ID when dropped.

§Panics

Panics if monitor_id is already in use.

Source

fn set_monitor_page(&self, vtl: Vtl, gpa: Option<u64>) -> Result<()>

Sets the GPA of the monitor page currently in use.

Provided Methods§

Source

fn allocate_monitor_page(&self, vtl: Vtl) -> Result<Option<u64>>

Allocates a monitor page and sets it as the monitor page currently in use. If allocating monitor pages is not supported, returns Ok(None).

The page will be deallocated if the monitor page is subsequently changed or cleared using SynicMonitor::set_monitor_page.

Implementors§