From: Lei Xia Date: Sat, 22 May 2010 00:58:28 +0000 (-0500) Subject: Add fix to the guest cores config, for multiple guests support X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb5a5b9e42a98314f95acd301116fc2022a90f9c;p=palacios.git Add fix to the guest cores config, for multiple guests support --- diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 39c4d49..efac49a 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -355,6 +355,7 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { int i = 0; v3_cfg_tree_t * cores_cfg = NULL; v3_cfg_tree_t * per_core_cfg = NULL; + int start_cpu_id = 0; if (cpu_type == V3_INVALID_CPU) { PrintError("Configuring guest on invalid CPU\n"); @@ -376,6 +377,7 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { } num_cores = atoi(v3_cfg_val(cores_cfg, "count")); + start_cpu_id = atoi(v3_cfg_val(cores_cfg, "start")); if (num_cores == 0) { PrintError("No cores specified in configuration\n"); @@ -409,7 +411,7 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob) { struct guest_info * info = &(vm->cores[i]); - info->cpu_id = i; + info->cpu_id = start_cpu_id + i; info->vm_info = vm; pre_config_core(info, per_core_cfg);