Index: trunk/src/VBox/Devices/PC/DevAPIC.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevAPIC.cpp	(revision 12484)
+++ trunk/src/VBox/Devices/PC/DevAPIC.cpp	(revision 12487)
@@ -180,7 +180,9 @@
 #ifndef VBOX
     QEMUTimer *timer;
-
     struct APICState *next_apic;
 #else /* VBOX */
+#ifdef VBOX_WITH_SMP_GUESTS
+    //struct APICState *next_apic;
+#endif
     /** The device instance - R3 Ptr. */
     PPDMDEVINSR3    pDevInsR3;
@@ -1543,4 +1545,8 @@
     APICState *s = PDMINS_2_DATA(pDevIns, APICState *);
 
+#ifdef VBOX_WITH_SMP_GUESTS
+    LogRel(("[SMP] apicMMIORead %p at %ullx\n", pDevIns, (uint64_t)GCPhysAddr));
+#endif
+
     STAM_COUNTER_INC(&CTXSUFF(s->StatMMIORead));
     switch (cb)
@@ -1674,5 +1680,10 @@
     bool            fGCEnabled;
     bool            fR0Enabled;
+
+#ifndef VBOX_WITH_SMP_GUESTS
     Assert(iInstance == 0);
+#else
+    LogRel(("[SMP] apicConstruct: %d %p\n", iInstance, pDevIns));
+#endif
 
     /*
@@ -1708,4 +1719,5 @@
         pThis->lvt[i] = 1 << 16; /* mask LVT */
     pThis->spurious_vec = 0xff;
+
 
     /*
@@ -1771,10 +1783,10 @@
     {
         if (   fIOAPIC                       /* If IOAPIC is enabled, enable Local APIC in any case */
-            || (   u32Ebx == X86_CPUID_VENDOR_INTEL_EBX
-                && u32Ecx == X86_CPUID_VENDOR_INTEL_ECX
-                && u32Edx == X86_CPUID_VENDOR_INTEL_EDX /* GenuineIntel */)
-            || (   u32Ebx == X86_CPUID_VENDOR_AMD_EBX
-                && u32Ecx == X86_CPUID_VENDOR_AMD_ECX
-                && u32Edx == X86_CPUID_VENDOR_AMD_EDX   /* AuthenticAMD */))
+               || (   u32Ebx == X86_CPUID_VENDOR_INTEL_EBX
+                      && u32Ecx == X86_CPUID_VENDOR_INTEL_ECX
+                      && u32Edx == X86_CPUID_VENDOR_INTEL_EDX /* GenuineIntel */)
+               || (   u32Ebx == X86_CPUID_VENDOR_AMD_EBX
+                      && u32Ecx == X86_CPUID_VENDOR_AMD_ECX
+                      && u32Edx == X86_CPUID_VENDOR_AMD_EDX   /* AuthenticAMD */))
         {
             LogRel(("Activating Local APIC\n"));
@@ -1862,5 +1874,9 @@
     PDM_DEVREG_CLASS_PIC,
     /* cMaxInstances */
+#ifdef VBOX_WITH_SMP_GUESTS
+    8,
+#else
     1,
+#endif
     /* cbInstance */
     sizeof(APICState),
Index: trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 12484)
+++ trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 12487)
@@ -431,5 +431,5 @@
         {
             ComPtr<IHostFloppyDrive> hostFloppyDrive;
-            hrc = floppyDrive->GetHostDrive(hostFloppyDrive.asOutParam());              H();
+            hrc = floppyDrive->GetHostDrive(hostFloppyDrive.asOutParam());                  H();
             if (hostFloppyDrive)
             {
@@ -500,4 +500,18 @@
      * Advanced Programmable Interrupt Controller.
      */
+#ifdef VBOX_WITH_SMP_GUESTS
+    rc = CFGMR3InsertNode(pDevices, "apic", &pDev);                                 RC_CHECK();
+    /* We need LAPIC per-CPU, as it allows cross-calls */
+    for (ULONG ulInstance = 0; ulInstance < cCpus; ulInstance++)
+    {
+        char szInstance[4]; Assert(ulInstance <= 999);
+        RTStrPrintf(szInstance, sizeof(szInstance), "%lu", ulInstance);
+        rc = CFGMR3InsertNode(pDev, szInstance, &pInst); 
+        RC_CHECK();
+        rc = CFGMR3InsertInteger(pInst, "Trusted",              1);     /* boolean */   RC_CHECK();
+        rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                               RC_CHECK();
+        rc = CFGMR3InsertInteger(pCfg,  "IOAPIC", fIOAPIC);                             RC_CHECK();
+    }
+#else
     rc = CFGMR3InsertNode(pDevices, "apic", &pDev);                                 RC_CHECK();
     rc = CFGMR3InsertNode(pDev,     "0", &pInst);                                   RC_CHECK();
@@ -505,4 +519,5 @@
     rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                               RC_CHECK();
     rc = CFGMR3InsertInteger(pCfg,  "IOAPIC", fIOAPIC);                             RC_CHECK();
+#endif
 
     if (fIOAPIC)
