From 1661adbbaf9c573fdca58475e32ab937c205a89a Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 23 Jun 2020 19:43:38 +0000 Subject: [PATCH] vmm: interrupt: add "Kvm" prefix to MsiInterruptGroup The structure is tightly coupled with KVM. It uses KVM specific structures and calls. Add Kvm prefix to it. Microsoft hypervisor will implement its own interrupt group(s) later. No functional change intended. Signed-off-by: Wei Liu --- vmm/src/interrupt.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vmm/src/interrupt.rs b/vmm/src/interrupt.rs index fc668f871..554024f04 100644 --- a/vmm/src/interrupt.rs +++ b/vmm/src/interrupt.rs @@ -108,19 +108,19 @@ pub struct KvmRoutingEntry { masked: bool, } -pub struct MsiInterruptGroup { +pub struct KvmMsiInterruptGroup { vm_fd: Arc, gsi_msi_routes: Arc>>, irq_routes: HashMap, } -impl MsiInterruptGroup { +impl KvmMsiInterruptGroup { fn new( vm_fd: Arc, gsi_msi_routes: Arc>>, irq_routes: HashMap, ) -> Self { - MsiInterruptGroup { + KvmMsiInterruptGroup { vm_fd, gsi_msi_routes, irq_routes, @@ -179,7 +179,7 @@ impl MsiInterruptGroup { } } -impl InterruptSourceGroup for MsiInterruptGroup { +impl InterruptSourceGroup for KvmMsiInterruptGroup { fn enable(&self) -> Result<()> { for (_, route) in self.irq_routes.iter() { route.enable(&self.vm_fd)?; @@ -372,7 +372,7 @@ impl InterruptManager for KvmMsiInterruptManager { irq_routes.insert(i, InterruptRoute::new(&mut allocator)?); } - Ok(Arc::new(Box::new(MsiInterruptGroup::new( + Ok(Arc::new(Box::new(KvmMsiInterruptGroup::new( self.vm_fd.clone(), self.gsi_msi_routes.clone(), irq_routes,