From 5ebd02a5720a713595c225670f1708d0f0e1191d Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 11 Jun 2020 16:42:29 +0000 Subject: [PATCH] vmm: vm: fix test_vm test case We should break out from the loop after getting the HLT exit, otherwise the VM hangs forever. Signed-off-by: Wei Liu --- vmm/src/vm.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 0b1b0155a..566914a90 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -1493,6 +1493,7 @@ pub fn test_vm() { VcpuExit::Debug => {} VcpuExit::Hlt => { println!("HLT"); + break; } VcpuExit::IrqWindowOpen => {} VcpuExit::Shutdown => {}