VMX: Report the correct flags in IA32_APICBASE MSR emulation

This commit reports to the guest that the apics are already in x2apic
mode, and reports the bsp flag only for guest pcore 0.

Change-Id: If04a424cc7a9668e966536e5369aefb1679321e5
Signed-off-by: Gan Shun Lim <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
diff --git a/kern/arch/x86/vmm/vmm.c b/kern/arch/x86/vmm/vmm.c
index 392814c..01bcaf8 100644
--- a/kern/arch/x86/vmm/vmm.c
+++ b/kern/arch/x86/vmm/vmm.c
@@ -460,7 +460,11 @@
 	if (!msr->written) {
 		/* TODO: tightly coupled to the addr in vmrunkernel.  We want this func
 		 * to return the val that vmrunkernel put into the VMCS. */
-		eax = 0xfee00900;
+		eax = 0xfee00d00;
+		if (vm_tf->tf_guest_pcoreid != 0) {
+			// Remove BSP bit if not core 0
+			eax = 0xfee00c00;
+		}
 		edx = 0;
 	} else {
 		edx = msr->edx;