Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


cleaned up VM run states and added pause state
[palacios.git] / palacios / src / palacios / vmm.c
index 0597be1..9e0fe08 100644 (file)
@@ -413,19 +413,23 @@ int v3_pause_vm(struct v3_vm_info * vm) {
 
     while (v3_raise_barrier(vm, NULL) == -1);
 
+    vm->run_state = VM_PAUSED;
+
     return 0;
 }
 
 
 int v3_continue_vm(struct v3_vm_info * vm) {
 
-    if (vm->run_state != VM_RUNNING) {
-       PrintError("Tried to continue a VM that was not already running\n");
+    if (vm->run_state != VM_PAUSED) {
+       PrintError("Tried to continue a VM that was not paused\n");
        return -1;
     }
 
     v3_lower_barrier(vm);
 
+    vm->run_state = VM_RUNNING;
+
     return 0;
 }