From: Peter Dinda Date: Wed, 6 Oct 2010 22:20:05 +0000 (-0500) Subject: v3_start_guest now exhibits the former behavior when X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=92edfe79109b322a996a9ad06d568b5555862003;p=palacios.git v3_start_guest now exhibits the former behavior when configured for linux - namely the current thread becomes the BP and thus v3_start_guest blocks --- diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 8e45d5b..2194ae5 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -225,10 +225,23 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) { // Finally launch the BSP on core 0 sprintf(tname,"core%u",0); + +#if CONFIG_LINUX + if (vm->num_cores==1) { + start_core(&(vm->cores[0])); + return -1; + } else { + if (!os_hooks->start_thread_on_cpu(0,start_core,&(vm->cores[0]),tname)) { + PrintError("Thread launch failed\n"); + return -1; + } + } +#else if (!os_hooks->start_thread_on_cpu(0,start_core,&(vm->cores[0]),tname)) { PrintError("Thread launch failed\n"); return -1; } +#endif return 0;