X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm.c;h=9061ab79ba984dfd0e2125cb05f5998e92f9308b;hb=69982930e8a2c0e44aeae5a95497fb896dad3da3;hp=dae7d34f4fe1148383b86c7bd253c7cae283fd84;hpb=6a686aa0cf80126e77d4f0f3a0eb882a7d302ae0;p=palacios.releases.git diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index dae7d34..9061ab7 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -63,7 +63,7 @@ static void init_cpu(void * arg) { } else #endif { - PrintError("CPU has no virtualization Extensions\n"); + PrintError("CPU has no virtualizationExtensions\n"); } } @@ -156,7 +156,7 @@ static int start_core(void *p) break; #endif default: - PrintError("Attemping to enter a guest on an invalid CPU\n"); + PrintError("Attempting to enter a guest on an invalid CPU\n"); return -1; } // should not happen @@ -203,6 +203,9 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) { proc_to_use=get_next_core(cpu_mask,last_proc); last_proc=proc_to_use; + // vm->cores[i].cpu_id=i; + // vm->cores[i].physical_cpu_id=proc_to_use; + PrintDebug("Starting virtual core %u on logical core %u\n",i,proc_to_use); sprintf(tname,"core%u",i); @@ -217,6 +220,9 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) { } } + // vm->cores[0].cpu_id=0; + // vm->cores[0].physical_cpu_id=0; + // Finally launch the BSP on core 0 sprintf(tname,"core%u",0); if (!os_hooks->start_thread_on_cpu(0,start_core,&(vm->cores[0]),tname)) { @@ -271,7 +277,7 @@ v3_cpu_mode_t v3_get_host_cpu_mode() { void v3_yield_cond(struct guest_info * info) { uint64_t cur_cycle; - rdtscll(cur_cycle); + cur_cycle = v3_get_host_time(&info->time_state); if (cur_cycle > (info->yield_start_cycle + info->vm_info->yield_cycle_period)) { @@ -280,7 +286,7 @@ void v3_yield_cond(struct guest_info * info) { (void *)cur_cycle, (void *)info->yield_start_cycle, (void *)info->yield_cycle_period); */ V3_Yield(); - rdtscll(info->yield_start_cycle); + info->yield_start_cycle = v3_get_host_time(&info->time_state); } } @@ -294,7 +300,7 @@ void v3_yield(struct guest_info * info) { V3_Yield(); if (info) { - rdtscll(info->yield_start_cycle); + info->yield_start_cycle = v3_get_host_time(&info->time_state); } }