From: Jack Lange Date: Tue, 24 Apr 2012 22:36:20 +0000 (-0400) Subject: Added run state checks to halt handler. This allows us to stop the VM while its in... X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=5162b3f7c10ddbd4fd54e0c2dd13f147af09c314;p=palacios.releases.git Added run state checks to halt handler. This allows us to stop the VM while its in a halt loop, like what happens when you run 'shutdown -h "now"' --- diff --git a/palacios/src/palacios/vmm_halt.c b/palacios/src/palacios/vmm_halt.c index f343d06..a183547 100644 --- a/palacios/src/palacios/vmm_halt.c +++ b/palacios/src/palacios/vmm_halt.c @@ -40,7 +40,7 @@ int v3_handle_halt(struct guest_info * info) { } else { PrintDebug("CPU Yield\n"); - while (!v3_intr_pending(info)) { + while (!v3_intr_pending(info) && (info->vm_info->run_state == VM_RUNNING)) { /* Yield, allowing time to pass while yielded */ v3_yield(info); v3_advance_time(info);