mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +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:
committed by
Samuel Ortiz
parent
c9ea235a0e
commit
f70c9937fb
@@ -458,6 +458,7 @@ impl DeviceManager {
|
|||||||
address_manager.allocator.clone(),
|
address_manager.allocator.clone(),
|
||||||
vm_info.vm_fd.clone(),
|
vm_info.vm_fd.clone(),
|
||||||
kvm_gsi_msi_routes,
|
kvm_gsi_msi_routes,
|
||||||
|
ioapic.clone(),
|
||||||
));
|
));
|
||||||
|
|
||||||
let console = DeviceManager::add_console_device(
|
let console = DeviceManager::add_console_device(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
|
// 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_bindings::{kvm_irq_routing, kvm_irq_routing_entry, KVM_IRQ_ROUTING_MSI};
|
||||||
use kvm_ioctls::VmFd;
|
use kvm_ioctls::VmFd;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
@@ -263,6 +264,7 @@ pub struct KvmInterruptManager {
|
|||||||
allocator: Arc<Mutex<SystemAllocator>>,
|
allocator: Arc<Mutex<SystemAllocator>>,
|
||||||
vm_fd: Arc<VmFd>,
|
vm_fd: Arc<VmFd>,
|
||||||
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
||||||
|
_ioapic: Arc<Mutex<ioapic::Ioapic>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl KvmInterruptManager {
|
impl KvmInterruptManager {
|
||||||
@@ -270,11 +272,13 @@ impl KvmInterruptManager {
|
|||||||
allocator: Arc<Mutex<SystemAllocator>>,
|
allocator: Arc<Mutex<SystemAllocator>>,
|
||||||
vm_fd: Arc<VmFd>,
|
vm_fd: Arc<VmFd>,
|
||||||
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
gsi_msi_routes: Arc<Mutex<HashMap<u32, KvmRoutingEntry>>>,
|
||||||
|
ioapic: Arc<Mutex<ioapic::Ioapic>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
KvmInterruptManager {
|
KvmInterruptManager {
|
||||||
allocator,
|
allocator,
|
||||||
vm_fd,
|
vm_fd,
|
||||||
gsi_msi_routes,
|
gsi_msi_routes,
|
||||||
|
_ioapic: ioapic,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user