mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-02 01:45:21 +00:00
vmm: Parallelise functionality with kernel loading
Move fuctionality earlier in the boot so as to run in parallel with the loading of the kernel. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
e70bd069b3
commit
744a049007
@ -2139,6 +2139,13 @@ impl Vm {
|
|||||||
};
|
};
|
||||||
current_state.valid_transition(new_state)?;
|
current_state.valid_transition(new_state)?;
|
||||||
|
|
||||||
|
// Do earlier to parallelise with loading kernel
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
let rsdp_addr = self.create_acpi_tables();
|
||||||
|
|
||||||
|
self.setup_signal_handler()?;
|
||||||
|
self.setup_tty()?;
|
||||||
|
|
||||||
// Load kernel if configured
|
// Load kernel if configured
|
||||||
let entry_point = self.entry_point()?;
|
let entry_point = self.entry_point()?;
|
||||||
|
|
||||||
@ -2163,8 +2170,6 @@ impl Vm {
|
|||||||
Vec::new()
|
Vec::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
let rsdp_addr = self.create_acpi_tables();
|
|
||||||
|
|
||||||
// Configuring the TDX regions requires that the vCPUs are created.
|
// Configuring the TDX regions requires that the vCPUs are created.
|
||||||
#[cfg(feature = "tdx")]
|
#[cfg(feature = "tdx")]
|
||||||
let hob_address = if self.config.lock().unwrap().tdx.is_some() {
|
let hob_address = if self.config.lock().unwrap().tdx.is_some() {
|
||||||
@ -2174,6 +2179,11 @@ impl Vm {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// On aarch64 the ACPI tables depend on the vCPU mpidr which is only
|
||||||
|
// available after they are configured
|
||||||
|
#[cfg(target_arch = "aarch64")]
|
||||||
|
let rsdp_addr = self.create_acpi_tables();
|
||||||
|
|
||||||
// Configure shared state based on loaded kernel
|
// Configure shared state based on loaded kernel
|
||||||
entry_point
|
entry_point
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
@ -2208,9 +2218,6 @@ impl Vm {
|
|||||||
.map_err(Error::CpuManager)?;
|
.map_err(Error::CpuManager)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.setup_signal_handler()?;
|
|
||||||
self.setup_tty()?;
|
|
||||||
|
|
||||||
let mut state = self.state.try_write().map_err(|_| Error::PoisonedState)?;
|
let mut state = self.state.try_write().map_err(|_| Error::PoisonedState)?;
|
||||||
*state = new_state;
|
*state = new_state;
|
||||||
event!("vm", "booted");
|
event!("vm", "booted");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user