mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-20 15:01:16 +00:00
vmm: interrupt: rename set_kvm_gsi_routes to set_gsi_routes
This function will be used to commit routing information to the hypervisor. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
fd7b42e54d
commit
4dbca81b86
@ -133,7 +133,7 @@ impl<E> MsiInterruptGroup<E> {
|
|||||||
type KvmMsiInterruptGroup = MsiInterruptGroup<kvm_irq_routing_entry>;
|
type KvmMsiInterruptGroup = MsiInterruptGroup<kvm_irq_routing_entry>;
|
||||||
|
|
||||||
impl KvmMsiInterruptGroup {
|
impl KvmMsiInterruptGroup {
|
||||||
fn set_kvm_gsi_routes(&self) -> Result<()> {
|
fn set_gsi_routes(&self) -> Result<()> {
|
||||||
let gsi_msi_routes = self.gsi_msi_routes.lock().unwrap();
|
let gsi_msi_routes = self.gsi_msi_routes.lock().unwrap();
|
||||||
let mut entry_vec: Vec<kvm_irq_routing_entry> = Vec::new();
|
let mut entry_vec: Vec<kvm_irq_routing_entry> = Vec::new();
|
||||||
for (_, entry) in gsi_msi_routes.iter() {
|
for (_, entry) in gsi_msi_routes.iter() {
|
||||||
@ -229,7 +229,7 @@ impl InterruptSourceGroup for KvmMsiInterruptGroup {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.set_kvm_gsi_routes();
|
return self.set_gsi_routes();
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(io::Error::new(
|
Err(io::Error::new(
|
||||||
@ -249,9 +249,9 @@ impl InterruptSourceGroup for KvmMsiInterruptGroup {
|
|||||||
format!("mask: No existing route for interrupt index {}", index),
|
format!("mask: No existing route for interrupt index {}", index),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
// Drop the guard because set_kvm_gsi_routes will try to take the lock again.
|
// Drop the guard because set_gsi_routes will try to take the lock again.
|
||||||
drop(gsi_msi_routes);
|
drop(gsi_msi_routes);
|
||||||
self.set_kvm_gsi_routes()?;
|
self.set_gsi_routes()?;
|
||||||
return route.disable(&self.vm_fd);
|
return route.disable(&self.vm_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,9 +272,9 @@ impl InterruptSourceGroup for KvmMsiInterruptGroup {
|
|||||||
format!("mask: No existing route for interrupt index {}", index),
|
format!("mask: No existing route for interrupt index {}", index),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
// Drop the guard because set_kvm_gsi_routes will try to take the lock again.
|
// Drop the guard because set_gsi_routes will try to take the lock again.
|
||||||
drop(gsi_msi_routes);
|
drop(gsi_msi_routes);
|
||||||
self.set_kvm_gsi_routes()?;
|
self.set_gsi_routes()?;
|
||||||
return route.enable(&self.vm_fd);
|
return route.enable(&self.vm_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user