mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Refactor AArch64 GIC initialization process
In the new process, `device::Gic::new()` covers additional actions: 1. Creating `hypervisor::vGic` 2. Initializing interrupt routings The change makes the vGic device ready in the beginning of `DeviceManager::create_devices()`. This can unblock the GIC related devices initialization in the `DeviceManager`. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
86e7f07485
commit
7d16c74020
@@ -549,7 +549,7 @@ pub(crate) struct AddressManager {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub(crate) io_bus: Arc<Bus>,
|
||||
pub(crate) mmio_bus: Arc<Bus>,
|
||||
vm: Arc<dyn hypervisor::Vm>,
|
||||
pub(crate) vm: Arc<dyn hypervisor::Vm>,
|
||||
device_tree: Arc<Mutex<DeviceTree>>,
|
||||
pci_mmio_allocators: Vec<Arc<Mutex<AddressAllocator>>>,
|
||||
}
|
||||
@@ -1376,6 +1376,7 @@ impl DeviceManager {
|
||||
gic::Gic::new(
|
||||
self.config.lock().unwrap().cpus.boot_vcpus,
|
||||
Arc::clone(&self.msi_interrupt_manager),
|
||||
self.address_manager.vm.clone(),
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateInterruptController)?,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user