X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=c7282233eb4793276cbb1b75ae884f3214d8789e;hp=1cadad751a2ccc3214376eff3ca23b913eeb97fe;hb=068d7e66db537f981fde19a098a12e4390fa3de4;hpb=52e81251f82ccaf516e3ed626c8abbcc9fbe3f41 diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 1cadad7..c728223 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -70,11 +70,13 @@ static int passthrough_mem_write(addr_t guest_addr, void * src, uint_t length, v #endif int v3_pre_config_guest(struct guest_info * info, struct v3_vm_config * config_ptr) { - extern v3_cpu_arch_t v3_cpu_type; + extern v3_cpu_arch_t v3_cpu_types[]; // Amount of ram the Guest will have, rounded to a 4K page boundary info->mem_size = config_ptr->mem_size & ~(addr_t)0xfff; + info->cpu_id = config_ptr->guest_cpu; + /* * Initialize the subsystem data strutures */ @@ -110,7 +112,7 @@ int v3_pre_config_guest(struct guest_info * info, struct v3_vm_config * config_p // Initialize the memory map v3_init_shadow_map(info); - if ((v3_cpu_type == V3_SVM_REV3_CPU) && + if ((v3_cpu_types[info->cpu_id] == V3_SVM_REV3_CPU) && (config_ptr->enable_nested_paging == 1)) { PrintDebug("Guest Page Mode: NESTED_PAGING\n"); info->shdw_pg_mode = NESTED_PAGING;