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.


deinitialization fixes
[palacios.git] / palacios / src / palacios / vmm.c
index 0597be1..078ae4a 100644 (file)
@@ -154,7 +154,8 @@ void Shutdown_V3() {
     if ((os_hooks) && (os_hooks->call_on_cpu)) {
        for (i = 0; i < V3_CONFIG_MAX_CPUS; i++) {
            if (v3_cpu_types[i] != V3_INVALID_CPU) {
-               deinit_cpu((void *)(addr_t)i);
+               V3_Call_On_CPU(i, deinit_cpu, (void *)(addr_t)i);
+               //deinit_cpu((void *)(addr_t)i);
            }
        }
     }
@@ -413,19 +414,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;
 }