Index: /trunk/include/VBox/vmm/apic.h
===================================================================
--- /trunk/include/VBox/vmm/apic.h	(revision 65134)
+++ /trunk/include/VBox/vmm/apic.h	(revision 65135)
@@ -161,13 +161,4 @@
 #endif /* IN_RING3 */
 
-#ifdef IN_RING0
-/** @defgroup grp_apic_r0  The APIC Host Context Ring-0 API
- * @{
- */
-VMMR0_INT_DECL(int)         APICR0InitVM(PVM pVM);
-VMMR0_INT_DECL(int)         APICR0TermVM(PVM pVM);
-/** @} */
-#endif /* IN_RING0 */
-
 /* These functions are exported as they are called from external modules (recompiler). */
 VMMDECL(void)               APICUpdatePendingInterrupts(PVMCPU pVCpu);
@@ -190,4 +181,6 @@
 VMM_INT_DECL(int)           APICBusDeliver(PVM pVM, uint8_t uDest, uint8_t uDestMode, uint8_t uDeliveryMode, uint8_t uVector,
                                            uint8_t uPolarity, uint8_t uTriggerMode, uint32_t uTagSrc);
+VMM_INT_DECL(int)           APICGetApicPageForCpu(PVMCPU pVCpu, PRTHCPHYS pHCPhys, PRTR0PTR pR0Ptr, PRTR3PTR pR3Ptr,
+                                                  PRTRCPTR pRCPtr);
 
 /** @name Hyper-V interface (Ring-3 and all-context API).
Index: /trunk/src/VBox/VMM/VMMAll/APICAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/APICAll.cpp	(revision 65134)
+++ /trunk/src/VBox/VMM/VMMAll/APICAll.cpp	(revision 65135)
@@ -3275,2 +3275,30 @@
 }
 
+
+/**
+ * Gets the APIC page pointers for the specified VCPU.
+ *
+ * @returns VBox status code.
+ * @param   pVCpu           The cross context virtual CPU structure.
+ * @param   pHCPhys         Where to store the host-context physical address.
+ * @param   pR0Ptr          Where to store the ring-0 address.
+ * @param   pR3Ptr          Where to store the ring-3 address (optional).
+ * @param   pRCPtr          Where to store the raw-mode context address
+ *                          (optional).
+ */
+VMM_INT_DECL(int) APICGetApicPageForCpu(PVMCPU pVCpu, PRTHCPHYS pHCPhys, PRTR0PTR pR0Ptr, PRTR3PTR pR3Ptr, PRTRCPTR pRCPtr)
+{
+    AssertReturn(pVCpu,   VERR_INVALID_PARAMETER);
+    AssertReturn(pHCPhys, VERR_INVALID_PARAMETER);
+    AssertReturn(pR0Ptr,  VERR_INVALID_PARAMETER);
+
+    PCAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu);
+    *pHCPhys = pApicCpu->HCPhysApicPage;
+    *pR0Ptr  = pApicCpu->pvApicPageR0;
+    if (pR3Ptr)
+        *pR3Ptr  = pApicCpu->pvApicPageR3;
+    if (pRCPtr)
+        *pRCPtr  = pApicCpu->pvApicPageRC;
+    return VINF_SUCCESS;
+}
+
