pci: Improve MSI-X code to let VFIO rely on it

This commit enhances the current msi-x code hosted in the pci crate
in order to be reused by the vfio crate. Specifically, it creates
several useful methods for the MsixCap structure that can simplify
the caller's code.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-07-16 17:19:21 -07:00
parent 29878956bd
commit 72007f016a
3 changed files with 60 additions and 16 deletions

View File

@@ -24,7 +24,7 @@ pub use self::configuration::{
pub use self::device::{
Error as PciDeviceError, InterruptDelivery, InterruptParameters, PciDevice,
};
pub use self::msix::{MsixCap, MsixConfig, MsixTableEntry};
pub use self::msix::{MsixCap, MsixConfig, MsixTableEntry, MSIX_TABLE_ENTRY_SIZE};
/// PCI has four interrupt pins A->D.
#[derive(Copy, Clone)]