mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ioapic: Rely fully on the InterruptSourceGroup to manage interrupts
This commit relies on the interrupt manager and the resulting interrupt source group to abstract the knowledge about KVM and how interrupts are updated and delivered. This allows the entire "devices" crate to be freed from kvm_ioctls and kvm_bindings dependencies. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
2dca959084
commit
0042f1de75
@@ -451,8 +451,7 @@ impl DeviceManager {
|
||||
None,
|
||||
));
|
||||
|
||||
let ioapic =
|
||||
DeviceManager::add_ioapic(vm_info, &address_manager, ioapic_interrupt_manager)?;
|
||||
let ioapic = DeviceManager::add_ioapic(&address_manager, ioapic_interrupt_manager)?;
|
||||
|
||||
// Creation of the global interrupt manager, which can take a hold onto
|
||||
// the brand new Ioapic.
|
||||
@@ -698,13 +697,12 @@ impl DeviceManager {
|
||||
}
|
||||
|
||||
fn add_ioapic(
|
||||
vm_info: &VmInfo,
|
||||
address_manager: &Arc<AddressManager>,
|
||||
interrupt_manager: Arc<dyn InterruptManager>,
|
||||
) -> DeviceManagerResult<Arc<Mutex<ioapic::Ioapic>>> {
|
||||
// Create IOAPIC
|
||||
let ioapic = Arc::new(Mutex::new(
|
||||
ioapic::Ioapic::new(vm_info.vm_fd.clone(), APIC_START, interrupt_manager)
|
||||
ioapic::Ioapic::new(APIC_START, interrupt_manager)
|
||||
.map_err(DeviceManagerError::CreateIoapic)?,
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user