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:
Rob Bradford 2019-09-06 18:37:41 +01:00 committed by Sebastien Boeuf
parent 7975394901
commit eb46aa2b22

View File

@ -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(())