Skip to content

Commit 0e290b5

Browse files
committed
Add helper struct to manage device interrupt mode
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]>
1 parent 746e537 commit 0e290b5

File tree

3 files changed

+673
-0
lines changed

3 files changed

+673
-0
lines changed

Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ kvm-ioctls = { version = "~0", optional = true }
1313
vfio-ioctls = { git = "https://github.com/cloud-hypervisor/vfio-ioctls.git", branch = "dragonball", optional = true }
1414
vmm-sys-util = "~0"
1515

16+
[dev-dependencies]
17+
byteorder = ">=1.2.1"
18+
1619
[features]
20+
default = ["legacy-irq", "msi-irq"]
1721
legacy-irq = []
1822
msi-irq = []
1923
vfio-msi-irq = []
24+
2025
kvm-irq = ["kvm-ioctls", "kvm-bindings"]
2126
kvm-msi-generic = ["msi-irq", "kvm-irq"]
2227
kvm-legacy-irq = ["legacy-irq", "kvm-irq"]

0 commit comments

Comments
 (0)