IrqFd

Trait IrqFd 

Source
pub trait IrqFd: Send + Sync {
    // Required method
    fn new_irqfd_route(&self) -> Result<Box<dyn IrqFdRoute>>;
}
Expand description

Trait for partitions that support irqfd-based interrupt delivery.

An irqfd associates an event with a GSI (Global System Interrupt), and a GSI routing table maps GSIs to MSI addresses and data values. When the event is signaled, the kernel looks up the GSI routing and injects the configured MSI into the guest without a usermode transition.

Required Methods§

Source

fn new_irqfd_route(&self) -> Result<Box<dyn IrqFdRoute>>

Creates a new irqfd route.

Allocates a GSI, creates an event, and registers the event with the hypervisor so that signaling it injects the configured MSI into the guest.

The caller retrieves the event via IrqFdRoute::event to pass to VFIO or other interrupt sources.

When the route is dropped, the irqfd is unregistered and the GSI is freed.

Implementors§