X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=3dd7915d84d96b80883d8cf249454f2817c9897d;hb=c31bb26014522e5678e9c9dcc9eda760eeb5907a;hp=8cdc907601f962b7457ac90da422413ec67b0aa6;hpb=921772c23185aa48406a390c58546ee463f49dc4;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 8cdc907..3dd7915 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -31,7 +31,7 @@ #include #include #include - +#include @@ -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; } @@ -434,8 +429,8 @@ 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()); +struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) { + 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; @@ -478,6 +473,8 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { return NULL; } + vm->host_priv_data = priv_data; + vm->cfg_data = cfg_data; V3_Print("Preconfiguration\n");