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.


Made memory manager reset distinct from removal of memory
[palacios.releases.git] / palacios / src / palacios / vmm_config.c
index d8f1961..e463e32 100644 (file)
@@ -452,6 +452,13 @@ static int post_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     }
 
 
+
+    // Initialize fw_cfg state for VMM<->VM SEABIOS communication
+    if (v3_fw_cfg_init(vm) == -1) {
+       PrintError(vm, VCORE_NONE, "Error initializing Firmware Config (fw_cfg) state\n");
+       return -1;
+    }
+
     /* 
      * Initialize configured devices
      */
@@ -588,7 +595,9 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) {
     V3_Print(vm, VCORE_NONE, "Preconfiguration\n");
 
     if (pre_config_vm(vm, vm->cfg_data->cfg) == -1) {
-       PrintError(vm, VCORE_NONE, "Error in preconfiguration\n");
+       PrintError(vm, VCORE_NONE, "Error in preconfiguration, attempting to free\n");
+       vm->run_state=VM_ERROR;
+       v3_free_vm(vm);
        return NULL;
     }
 
@@ -604,7 +613,9 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) {
        info->core_cfg_data = per_core_cfg;
 
        if (pre_config_core(info, per_core_cfg) == -1) {
-           PrintError(vm, VCORE_NONE, "Error in core %d preconfiguration\n", i);
+           PrintError(vm, VCORE_NONE, "Error in core %d preconfiguration, attempting to free guest\n", i);
+           vm->run_state=VM_ERROR;
+           v3_free_vm(vm);
            return NULL;
        }
 
@@ -616,7 +627,9 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) {
     V3_Print(vm, VCORE_NONE, "Post Configuration\n");
 
     if (post_config_vm(vm, vm->cfg_data->cfg) == -1) {
-        PrintError(vm, VCORE_NONE, "Error in postconfiguration\n");
+        PrintError(vm, VCORE_NONE, "Error in postconfiguration, attempting to free guest\n");
+       vm->run_state=VM_ERROR;
+       v3_free_vm(vm);
        return NULL;
     }