mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vmm: Add ioapic to KvmInterruptManager
By having a reference to the IOAPIC, the KvmInterruptManager is going to be able to initialize properly the legacy interrupt source group. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
c9ea235a0e
commit
f70c9937fb
@ -458,6 +458,7 @@ impl DeviceManager {
|
||||
address_manager.allocator.clone(),
|
||||
vm_info.vm_fd.clone(),
|
||||
kvm_gsi_msi_routes,
|
||||
ioapic.clone(),
|
||||
));
|
||||
|
||||
let console = DeviceManager::add_console_device(
|
||||
|
@ -3,6 +3,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
|
||||
//
|
||||
|
||||
use devices::ioapic;
|
||||
use kvm_bindings::{kvm_irq_routing, kvm_irq_routing_entry, KVM_IRQ_ROUTING_MSI};
|
||||
use kvm_ioctls::VmFd;
|
||||
use std::collections::HashMap;
|
||||
@ -263,6 +264,7 @@ pub struct KvmInterruptManager {
|
||||
allocator: Arc<Mutex<SystemAllocator>>,
|
||||
vm_fd: Arc<VmFd>,
|
||||
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
||||
_ioapic: Arc<Mutex<ioapic::Ioapic>>,
|
||||
}
|
||||
|
||||
impl KvmInterruptManager {
|
||||
@ -270,11 +272,13 @@ impl KvmInterruptManager {
|
||||
allocator: Arc<Mutex<SystemAllocator>>,
|
||||
vm_fd: Arc<VmFd>,
|
||||
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
||||
ioapic: Arc<Mutex<ioapic::Ioapic>>,
|
||||
) -> Self {
|
||||
KvmInterruptManager {
|
||||
allocator,
|
||||
vm_fd,
|
||||
gsi_msi_routes,
|
||||
_ioapic: ioapic,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user