Skip to content

Commit

Permalink
Add helper struct to manage device interrupt mode
Browse files Browse the repository at this point in the history
A device may support multiple interrupt modes. For example, a PCI
device may support legacy, PCI MSI and PCI MSIx interrupts. So add
struct DeviceInterruptManager to manage the device interupt working
mode. This interrupt manager helps a device backend driver to manage
its interrupts and provides interfaces to switch interrupt working
modes.

Signed-off-by: Liu Jiang <[email protected]>
  • Loading branch information
jiangliu committed Jun 10, 2020
1 parent 3b98995 commit 8a64aee
Show file tree
Hide file tree
Showing 3 changed files with 673 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ kvm-ioctls = { version = "~0", optional = true }
vfio-ioctls = { git = "https://github.com/cloud-hypervisor/vfio-ioctls.git", branch = "dragonball", optional = true }
vmm-sys-util = "~0"

[dev-dependencies]
byteorder = ">=1.2.1"

[features]
default = ["legacy-irq", "msi-irq"]
legacy-irq = []
msi-irq = []
vfio-msi-irq = []

kvm-irq = ["kvm-ioctls", "kvm-bindings"]
kvm-msi-generic = ["msi-irq", "kvm-irq"]
kvm-legacy-irq = ["legacy-irq", "kvm-irq"]
Expand Down
Loading

0 comments on commit 8a64aee

Please sign in to comment.