mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
vmm: If acpi feature is disabled make "reboot" shutdown
With ACPI disabled there is no way to support both reset and shutdown so make the VMM exit if the VM is rebootet (via i8042 or triple-fault reset.) Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
7975394901
commit
eb46aa2b22
@ -61,9 +61,13 @@ pub fn boot_kernel(config: VmConfig) -> Result<()> {
|
||||
let mut vm = Vm::new(&vmm.kvm, &config).map_err(Error::VmNew)?;
|
||||
|
||||
let entry = vm.load_kernel().map_err(Error::LoadKernel)?;
|
||||
|
||||
if vm.start(entry).map_err(Error::VmStart)? == ExitBehaviour::Shutdown {
|
||||
break;
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "acpi"))]
|
||||
break;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user