diff --git a/vmm/src/interrupt.rs b/vmm/src/interrupt.rs index f482fc74f..202233be7 100644 --- a/vmm/src/interrupt.rs +++ b/vmm/src/interrupt.rs @@ -320,19 +320,21 @@ pub struct LegacyUserspaceInterruptManager { ioapic: Arc>, } -pub struct KvmMsiInterruptManager { +pub struct MsiInterruptManager { allocator: Arc>, vm_fd: Arc, - gsi_msi_routes: Arc>>, + gsi_msi_routes: Arc>>>, } +pub type KvmMsiInterruptManager = MsiInterruptManager; + impl LegacyUserspaceInterruptManager { pub fn new(ioapic: Arc>) -> Self { LegacyUserspaceInterruptManager { ioapic } } } -impl KvmMsiInterruptManager { +impl MsiInterruptManager { pub fn new(allocator: Arc>, vm_fd: Arc) -> Self { // Create a shared list of GSI that can be shared through all PCI // devices. This way, we can maintain the full list of used GSI, @@ -340,7 +342,7 @@ impl KvmMsiInterruptManager { // another one. let gsi_msi_routes = Arc::new(Mutex::new(HashMap::new())); - KvmMsiInterruptManager { + MsiInterruptManager { allocator, vm_fd, gsi_msi_routes,