pub struct MsixEmulator { /* private fields */ }Expand description
Emulator for the hardware-level interface required to configure and trigger MSI-X interrupts on a PCI device.
Implementations§
Source§impl MsixEmulator
impl MsixEmulator
Sourcepub fn new(
bar: u8,
count: u16,
msi_target: &MsiTarget,
) -> (Self, impl PciCapability + use<>)
pub fn new( bar: u8, count: u16, msi_target: &MsiTarget, ) -> (Self, impl PciCapability + use<>)
Create a new MsixEmulator instance, along with with its associated
PciCapability structure.
This implementation of MSI-X expects a dedicated BAR to store the vector and pending tables.
DEVNOTE: This current implementation of MSI-X isn’t particularly “flexible” with respect to the various ways the PCI spec allows MSI-X to be implemented. e.g: it uses a shared BAR for the table and BPA, with fixed offsets into the BAR for both of those tables. It would be nice to re-visit this code and make it more flexible.
Sourcepub fn bar_len(&self) -> u64
pub fn bar_len(&self) -> u64
Return the total length of the MSI-X BAR (Actually, the notion that there is an “MSI-X BAR” is an issue to fix sometime. MSI-X tables are often in the same bar as other things.)
Trait Implementations§
Source§impl Clone for MsixEmulator
impl Clone for MsixEmulator
Source§fn clone(&self) -> MsixEmulator
fn clone(&self) -> MsixEmulator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more