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.


reworked launch code
[palacios.git] / palacios / src / palacios / vmm_config.c
index 8cdc907..3f952cf 100644 (file)
@@ -31,7 +31,7 @@
 #include <palacios/vmm_io.h>
 #include <palacios/vmm_msr.h>
 #include <palacios/vmm_mptable.h>
-
+#include <palacios/vmm_sprintf.h>
 
 
 
@@ -220,7 +220,8 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
     char * vm_class = v3_cfg_val(vm_cfg, "class");
     char * align_str = v3_cfg_val(v3_cfg_subtree(vm_cfg, "memory"), "alignment");
     uint32_t sched_hz = 100;   // set the schedule frequency to 100 HZ
-    
+
+
     if (!memory_str) {
        PrintError("Memory is a required configuration parameter\n");
        return -1;
@@ -234,10 +235,10 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
     }
 
     // Amount of ram the Guest will have, always in MB
-    vm->mem_size = atoi(memory_str) * 1024 * 1024;
+    vm->mem_size = (addr_t)atoi(memory_str) * 1024 * 1024;
     vm->mem_align = get_alignment(align_str);
 
-    PrintDebug("Alignment computed as 0x%x\n", vm->mem_align);
+    PrintDebug("Alignment for %lu bytes of memory computed as 0x%x\n", vm->mem_size, vm->mem_align);
 
     if (strcasecmp(vm_class, "PC") == 0) {
        vm->vm_class = V3_PC_VM;
@@ -390,12 +391,6 @@ static int post_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        return -1;
     }
 
-    if (v3_inject_mptable(vm) == -1) { 
-       PrintError("Failed to inject mptable during configuration\n");
-       return -1;
-    }
-
-
     return 0;
 }
 
@@ -435,7 +430,7 @@ static struct v3_vm_info * allocate_guest(int num_cores) {
 
 
 struct v3_vm_info * v3_config_guest(void * cfg_blob) {
-    v3_cpu_arch_t cpu_type = v3_get_cpu_type(v3_get_cpu_id());
+    v3_cpu_arch_t cpu_type = v3_get_cpu_type(V3_Get_CPU());
     struct v3_config * cfg_data = NULL;
     struct v3_vm_info * vm = NULL;
     int num_cores = 0;