From: Jack Lange Date: Fri, 4 Mar 2011 22:28:02 +0000 (-0600) Subject: fixed local core startup check X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=e874305a90a64fc14c06c00c8d57f8019709c19f;p=palacios.git fixed local core startup check --- diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 7e08dd9..c5a7eb9 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -290,17 +290,19 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) { i--; // We reset the logical core idx. Not strictly necessary I guess... } else { + + /* This assumes that the core 0 thread has been mapped to physical core 0 */ + if (i == V3_Get_CPU()) { + // We skip the local CPU because it is reserved for vcore 0 + continue; + } + core_idx = i; } major = core_idx / 8; minor = core_idx % 8; - /* This assumes that the core 0 thread has been mapped to physical core 0 */ - if (core_idx == V3_Get_CPU()) { - // We skip the local CPU because it is reserved for vcore 0 - continue; - } if ((core_mask[major] & (0x1 << minor)) == 0) {