mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Split create_gic() from configure_system()
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Rob Bradford
parent
9341cce8b3
commit
195eba188a
@@ -1021,17 +1021,22 @@ impl Vm {
|
||||
);
|
||||
}
|
||||
|
||||
// Call `configure_system` and pass the GIC devices out, so that
|
||||
// we can register the GIC device to the device manager.
|
||||
let gic_device = arch::configure_system(
|
||||
let gic_device = create_gic(
|
||||
&self.memory_manager.lock().as_ref().unwrap().vm,
|
||||
self.cpu_manager.lock().unwrap().boot_vcpus() as u64,
|
||||
)
|
||||
.map_err(|e| {
|
||||
Error::ConfigureSystem(arch::Error::AArch64Setup(arch::aarch64::Error::SetupGic(e)))
|
||||
})?;
|
||||
|
||||
arch::configure_system(
|
||||
&mem,
|
||||
&cmdline_cstring,
|
||||
self.cpu_manager.lock().unwrap().boot_vcpus() as u64,
|
||||
vcpu_mpidrs,
|
||||
device_info,
|
||||
&initramfs_config,
|
||||
&pci_space,
|
||||
&*gic_device,
|
||||
)
|
||||
.map_err(Error::ConfigureSystem)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user