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.


Expose HVM state to host + Linux host /proc additions for it
[palacios.git] / palacios / src / palacios / vmm_config.c
index 781754a..7987957 100644 (file)
 #include <palacios/vmm_swapping.h>
 #endif
 
+#ifdef V3_CONFIG_MULTIBOOT
+#include <palacios/vmm_multiboot.h>
+#endif
+
+#ifdef V3_CONFIG_HVM
+#include <palacios/vmm_hvm.h>
+#endif
+
 #include <palacios/vmm_host_events.h>
 #include <palacios/vmm_perftune.h>
 
@@ -356,7 +364,18 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
        return -1;
     }
 
-
+#ifdef V3_CONFIG_MULTIBOOT
+    if (v3_init_multiboot_vm(vm,vm_cfg)) { 
+       PrintError(vm,VCORE_NONE,"Cannot initialize Multiboot for VM\n");
+       return -1;
+    }
+#endif
+#ifdef V3_CONFIG_HVM
+    if (v3_init_hvm_vm(vm,vm_cfg)) { 
+       PrintError(vm,VCORE_NONE,"Cannot initialize HVM for VM\n");
+       return -1;
+    }
+#endif
 
    if (schedule_hz_str) {
        sched_hz = atoi(schedule_hz_str);
@@ -425,6 +444,19 @@ static int pre_config_core(struct guest_info * info, v3_cfg_tree_t * core_cfg) {
        return -1;
     }
 
+#ifdef V3_CONFIG_MULTIBOOT
+    if (v3_init_multiboot_core(info)) { 
+       PrintError(info->vm_info, info, "Error Initializing Multiboot Core\n");
+       return -1;
+    }
+#endif
+#ifdef V3_CONFIG_HVM
+    if (v3_init_hvm_core(info)) { 
+       PrintError(info->vm_info, info, "Error Initializing HVM Core\n");
+       return -1;
+    }
+#endif
+
     if (info->vm_info->vm_class == V3_PC_VM) {
        if (pre_config_pc_core(info, core_cfg) == -1) {
            PrintError(info->vm_info, info, "PC Post configuration failure\n");