diff --git a/vmm/src/interrupt.rs b/vmm/src/interrupt.rs index 6e4cb4494..01769f71a 100644 --- a/vmm/src/interrupt.rs +++ b/vmm/src/interrupt.rs @@ -116,6 +116,10 @@ struct MsiInterruptGroup { irq_routes: HashMap, } +trait MsiInterruptGroupOps { + fn set_gsi_routes(&self) -> Result<()>; +} + trait RoutingEntryExt { fn make_entry(gsi: u32, config: &InterruptSourceConfig) -> Result>; } @@ -164,7 +168,7 @@ impl MsiInterruptGroup { type KvmMsiInterruptGroup = MsiInterruptGroup; -impl KvmMsiInterruptGroup { +impl MsiInterruptGroupOps for KvmMsiInterruptGroup { fn set_gsi_routes(&self) -> Result<()> { let gsi_msi_routes = self.gsi_msi_routes.lock().unwrap(); let mut entry_vec: Vec = Vec::new();