X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=50e3b1c0b6283e88253aa49f2fe95e44e63aee28;hb=22c7f98617f63f097b08e8159383c23aa6d9ad33;hp=3f952cf5cdefa752802c138efbf84cdda10ed59e;hpb=b580d9fca65a7b6f84eaebb57cad09bc6e941dfd;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 3f952cf..50e3b1c 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -166,7 +166,6 @@ static struct v3_config * parse_config(void * cfg_blob) { return NULL; } - V3_Print("File index=%d id=%s\n", idx, id); strncpy(file->tag, id, 256); @@ -212,9 +211,9 @@ static inline uint32_t get_alignment(char * align_str) { return alignment; } -static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) { +static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) { char * memory_str = v3_cfg_val(vm_cfg, "memory"); char * schedule_hz_str = v3_cfg_val(vm_cfg, "schedule_hz"); char * vm_class = v3_cfg_val(vm_cfg, "class"); @@ -279,8 +278,8 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) { return 0; } -static int determine_paging_mode(struct guest_info *info, v3_cfg_tree_t * core_cfg) -{ + +static int determine_paging_mode(struct guest_info * info, v3_cfg_tree_t * core_cfg) { extern v3_cpu_arch_t v3_cpu_types[]; v3_cfg_tree_t * vm_tree = info->vm_info->cfg_data->cfg; @@ -429,7 +428,7 @@ static struct v3_vm_info * allocate_guest(int num_cores) { -struct v3_vm_info * v3_config_guest(void * cfg_blob) { +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; @@ -473,6 +472,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"); @@ -529,6 +530,16 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { +int v3_free_config(struct v3_vm_info * vm) { + + v3_free_htable(vm->cfg_data->file_table, 1, 0); + + v3_xml_free(vm->cfg_data->cfg); + + V3_Free(vm->cfg_data); + return 0; +} + static int setup_memory_map(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {