Index: trunk/src/VBox/Devices/PC/DevPIC.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 11260)
+++ trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 11261)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * Intel 8259 Programmable Interrupt Controller (PIC) Device.
+ * DevPIC - Intel 8259 Programmable Interrupt Controller (PIC) Device.
  */
 
@@ -28,5 +28,5 @@
 #include <iprt/assert.h>
 
-#include "vl_vbox.h"
+#include "../vl_vbox.h"
 
 
@@ -40,10 +40,10 @@
 #define PIC_LOCK(pThis, rc) \
     do { \
-        int rc2 = (pThis)->CTXALLSUFF(pPicHlp)->pfnLock((pThis)->CTXSUFF(pDevIns), rc); \
+        int rc2 = (pThis)->CTX_SUFF(pPicHlp)->pfnLock((pThis)->CTX_SUFF(pDevIns), rc); \
         if (rc2 != VINF_SUCCESS) \
             return rc2; \
     } while (0)
 #define PIC_UNLOCK(pThis) \
-    (pThis)->CTXALLSUFF(pPicHlp)->pfnUnlock((pThis)->CTXSUFF(pDevIns))
+    (pThis)->CTX_SUFF(pPicHlp)->pfnUnlock((pThis)->CTX_SUFF(pDevIns))
 
 
@@ -111,11 +111,11 @@
     uint8_t elcr; /* PIIX edge/trigger selection*/
     uint8_t elcr_mask;
-    /** Pointer to the device instance, HCPtr. */
-    R3R0PTRTYPE(PPDMDEVINS) pDevInsHC;
-    /** Pointer to the device instance, GCPtr. */
-    RCPTRTYPE(PPDMDEVINS)   pDevInsGC;
-#if HC_ARCH_BITS == 64
-    RTRCPTR                 Alignment0;
-#endif
+    /** Pointer to the device instance, R3 Ptr. */
+    PPDMDEVINSR3 pDevInsR3;
+    /** Pointer to the device instance, R0 Ptr. */
+    PPDMDEVINSR0 pDevInsR0;
+    /** Pointer to the device instance, RC Ptr. */
+    PPDMDEVINSRC pDevInsRC;
+    RTRCPTR      Alignment0; /**< Structure size alignment. */
 } PicState;
 
@@ -127,17 +127,16 @@
     /** The two interrupt controllers. */
     PicState                aPics[2];
+    /** Pointer to the device instance - R3 Ptr. */
+    PPDMDEVINSR3            pDevInsR3;
     /** Pointer to the PIC R3 helpers. */
     PCPDMPICHLPR3           pPicHlpR3;
+    /** Pointer to the device instance - R0 Ptr. */
+    PPDMDEVINSR0            pDevInsR0;
     /** Pointer to the PIC R0 helpers. */
     PCPDMPICHLPR0           pPicHlpR0;
-    /** Pointer to the PIC GC helpers. */
-    PCPDMPICHLPGC           pPicHlpGC;
-#if HC_ARCH_BITS == 32
-    uint32_t                Alignmnet1;
-#endif
-    /** Pointer to the device instance - GC Ptr. */
-    RCPTRTYPE(PPDMDEVINS)   pDevInsGC;
-    /** Pointer to the device instance - GC Ptr. */
-    R3R0PTRTYPE(PPDMDEVINS) pDevInsHC;
+    /** Pointer to the device instance - RC Ptr. */
+    PPDMDEVINSRC            pDevInsRC;
+    /** Pointer to the PIC RC helpers. */
+    PCPDMPICHLPRC           pPicHlpRC;
 #ifdef VBOX_WITH_STATISTICS
     STAMCOUNTER             StatSetIrqGC;
@@ -154,5 +153,5 @@
 static inline void DumpPICState(PicState *s, const char *szFn)
 {
-    PDEVPIC pData = PDMINS2DATA(CTXSUFF(s->pDevIns), PDEVPIC);
+    PDEVPIC pData = PDMINS2DATA(s->CTX_SUFF(pDevIns), PDEVPIC);
 
     Log2(("%s: pic%d: elcr=%x last_irr=%x irr=%x imr=%x isr=%x irq_base=%x\n",
@@ -213,5 +212,5 @@
 static int pic_get_irq(PicState *s)
 {
-    PicState *pics = &(PDMINS2DATA(CTXSUFF(s->pDevIns), PDEVPIC))->aPics[0];
+    PicState *pics = &(PDMINS2DATA(s->CTX_SUFF(pDevIns), PDEVPIC))->aPics[0];
     int mask, cur_priority, priority;
     Log(("pic_get_irq%d: mask=%x\n", (s == pics) ? 0 : 1, s->irr & ~s->imr));
@@ -272,5 +271,5 @@
             Log(("pic: cpu_interrupt\n"));
 #endif
-            pData->CTXALLSUFF(pPicHlp)->pfnSetInterruptFF(pData->CTXSUFF(pDevIns));
+            pData->CTX_SUFF(pPicHlp)->pfnSetInterruptFF(pData->CTX_SUFF(pDevIns));
         }
         else
@@ -281,5 +280,5 @@
 
             /* if this was the only pending irq, then we must clear the interrupt ff flag */
-            pData->CTXALLSUFF(pPicHlp)->pfnClearInterruptFF(pData->CTXSUFF(pDevIns));
+            pData->CTX_SUFF(pPicHlp)->pfnClearInterruptFF(pData->CTX_SUFF(pDevIns));
 
             /** @note Is this correct? */
@@ -295,5 +294,5 @@
 
         /* we must clear the interrupt ff flag */
-        pData->CTXALLSUFF(pPicHlp)->pfnClearInterruptFF(pData->CTXSUFF(pDevIns));
+        pData->CTX_SUFF(pPicHlp)->pfnClearInterruptFF(pData->CTX_SUFF(pDevIns));
     }
     return VINF_SUCCESS;
@@ -339,5 +338,5 @@
 
         Log(("pic_update_imr: clear pending interrupt %d\n", intno));
-        pData->CTXALLSUFF(pPicHlp)->pfnClearInterruptFF(pData->CTXSUFF(pDevIns));
+        pData->CTX_SUFF(pPicHlp)->pfnClearInterruptFF(pData->CTX_SUFF(pDevIns));
     }
 }
@@ -354,7 +353,7 @@
 {
     PDEVPIC     pData = PDMINS2DATA(pDevIns, PDEVPIC);
-    Assert(pData->CTXSUFF(pDevIns) == pDevIns);
-    Assert(pData->aPics[0].CTXSUFF(pDevIns) == pDevIns);
-    Assert(pData->aPics[1].CTXSUFF(pDevIns) == pDevIns);
+    Assert(pData->CTX_SUFF(pDevIns) == pDevIns);
+    Assert(pData->aPics[0].CTX_SUFF(pDevIns) == pDevIns);
+    Assert(pData->aPics[1].CTX_SUFF(pDevIns) == pDevIns);
     AssertMsg(iIrq < 16, ("iIrq=%d\n", iIrq));
 
@@ -449,15 +448,17 @@
 static void pic_reset(PicState *s)
 {
-    R3R0PTRTYPE(PPDMDEVINS) pDevInsHC = s->pDevInsHC;
-    RCPTRTYPE(PPDMDEVINS) pDevInsGC = s->pDevInsGC;
-    int tmp, tmp2;
-
-    tmp = s->elcr_mask;
-    tmp2 = s->elcr;
+    PPDMDEVINSR3 pDevInsR3 = s->pDevInsR3;
+    PPDMDEVINSR0 pDevInsR0 = s->pDevInsR0;
+    PPDMDEVINSRC pDevInsRC = s->pDevInsRC;
+    int elcr_mask = s->elcr_mask;
+    int elcr = s->elcr;
+
     memset(s, 0, sizeof(PicState));
-    s->elcr_mask = tmp;
-    s->elcr = tmp2;
-    s->pDevInsHC = pDevInsHC;
-    s->pDevInsGC = pDevInsGC;
+
+    s->elcr = elcr;
+    s->elcr_mask = elcr_mask;
+    s->pDevInsRC = pDevInsRC;
+    s->pDevInsR0 = pDevInsR0;
+    s->pDevInsR3 = pDevInsR3;
 }
 
@@ -466,5 +467,5 @@
 {
     PicState *s = (PicState*)opaque;
-    PDEVPIC     pData = PDMINS2DATA(CTXSUFF(s->pDevIns), PDEVPIC);
+    PDEVPIC     pData = PDMINS2DATA(s->CTX_SUFF(pDevIns), PDEVPIC);
     int         rc = VINF_SUCCESS;
     int priority, cmd, irq;
@@ -477,5 +478,5 @@
             pic_reset(s);
             /* deassert a pending interrupt */
-            pData->CTXALLSUFF(pPicHlp)->pfnClearInterruptFF(pData->CTXSUFF(pDevIns));
+            pData->CTX_SUFF(pPicHlp)->pfnClearInterruptFF(pData->CTX_SUFF(pDevIns));
 
             s->init_state = 1;
@@ -586,5 +587,5 @@
 static uint32_t pic_poll_read (PicState *s, uint32_t addr1)
 {
-    PDEVPIC     pData = PDMINS2DATA(CTXSUFF(s->pDevIns), PDEVPIC);
+    PDEVPIC     pData = PDMINS2DATA(s->CTX_SUFF(pDevIns), PDEVPIC);
     PicState   *pics = &pData->aPics[0];
     int ret;
@@ -902,8 +903,8 @@
     unsigned        i;
 
-    pData->pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
-    pData->pPicHlpGC = pData->pPicHlpR3->pfnGetGCHelpers(pDevIns);
-    for (i = 0; i < ELEMENTS(pData->aPics); i++)
-        pData->aPics[i].pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
+    pData->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
+    pData->pPicHlpRC = pData->pPicHlpR3->pfnGetRCHelpers(pDevIns);
+    for (i = 0; i < RT_ELEMENTS(pData->aPics); i++)
+        pData->aPics[i].pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
 }
 
@@ -947,28 +948,32 @@
      */
     Assert(ELEMENTS(pData->aPics) == 2);
-    pData->pDevInsHC = pDevIns;
-    pData->pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
+    pData->pDevInsR3 = pDevIns;
+    pData->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
+    pData->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
     pData->aPics[0].elcr_mask = 0xf8;
     pData->aPics[1].elcr_mask = 0xde;
-    pData->aPics[0].pDevInsHC = pDevIns;
-    pData->aPics[1].pDevInsHC = pDevIns;
-    pData->aPics[0].pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
-    pData->aPics[1].pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
+    pData->aPics[0].pDevInsR3 = pDevIns;
+    pData->aPics[1].pDevInsR3 = pDevIns;
+    pData->aPics[0].pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
+    pData->aPics[1].pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
+    pData->aPics[0].pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
+    pData->aPics[1].pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
 
     /*
-     * Register PIC, I/O ports and save state.
+     * Register us as the PIC with PDM.
      */
     PicReg.u32Version           = PDM_PICREG_VERSION;
-    PicReg.pfnSetIrqHC          = picSetIrq;
-    PicReg.pfnGetInterruptHC    = picGetInterrupt;
+    PicReg.pfnSetIrqR3          = picSetIrq;
+    PicReg.pfnGetInterruptR3    = picGetInterrupt;
+
     if (fGCEnabled)
     {
-        PicReg.pszSetIrqGC          = "picSetIrq";
-        PicReg.pszGetInterruptGC    = "picGetInterrupt";
+        PicReg.pszSetIrqRC          = "picSetIrq";
+        PicReg.pszGetInterruptRC    = "picGetInterrupt";
     }
     else
     {
-        PicReg.pszSetIrqGC          = NULL;
-        PicReg.pszGetInterruptGC    = NULL;
+        PicReg.pszSetIrqRC          = NULL;
+        PicReg.pszGetInterruptRC    = NULL;
     }
 
@@ -986,11 +991,14 @@
     Assert(pDevIns->pDevHlp->pfnPICRegister);
     rc = pDevIns->pDevHlp->pfnPICRegister(pDevIns, &PicReg, &pData->pPicHlpR3);
-    if (VBOX_FAILURE(rc))
-    {
-        AssertMsgFailed(("PICRegister -> %Vrc\n", rc));
-        return rc;
-    }
+    AssertLogRelMsgRCReturn(rc, ("PICRegister -> %Vrc\n", rc), rc);
     if (fGCEnabled)
-        pData->pPicHlpGC = pData->pPicHlpR3->pfnGetGCHelpers(pDevIns);
+        pData->pPicHlpRC = pData->pPicHlpR3->pfnGetRCHelpers(pDevIns);
+    if (fR0Enabled)
+        pData->pPicHlpR0 = pData->pPicHlpR3->pfnGetR0Helpers(pDevIns);
+
+
+    /*
+     * Register I/O ports and save state.
+     */
     rc = PDMDevHlpIOPortRegister(pDevIns,  0x20, 2, (void *)0, picIOPortWrite, picIOPortRead, NULL, NULL, "i8259 PIC #0");
     if (VBOX_FAILURE(rc))
@@ -1010,6 +1018,4 @@
     if (fR0Enabled)
     {
-        pData->pPicHlpR0 = pData->pPicHlpR3->pfnGetR0Helpers(pDevIns);
-
         rc = PDMDevHlpIOPortRegisterR0(pDevIns,  0x20, 2, 0, "picIOPortWrite", "picIOPortRead", NULL, NULL, "i8259 PIC #0");
         if (VBOX_FAILURE(rc))
Index: trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp
===================================================================
--- trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp	(revision 11260)
+++ trunk/src/VBox/Devices/testcase/tstDeviceStructSizeGC.cpp	(revision 11261)
@@ -447,15 +447,17 @@
     GEN_CHECK_OFF(PicState, elcr);
     GEN_CHECK_OFF(PicState, elcr_mask);
-    GEN_CHECK_OFF(PicState, pDevInsHC);
-    GEN_CHECK_OFF(PicState, pDevInsGC);
+    GEN_CHECK_OFF(PicState, pDevInsR3);
+    GEN_CHECK_OFF(PicState, pDevInsR0);
+    GEN_CHECK_OFF(PicState, pDevInsRC);
 
     GEN_CHECK_SIZE(DEVPIC);
     GEN_CHECK_OFF(DEVPIC, aPics);
     GEN_CHECK_OFF(DEVPIC, aPics[1]);
-    GEN_CHECK_OFF(DEVPIC, pDevInsHC);
-    GEN_CHECK_OFF(DEVPIC, pDevInsGC);
+    GEN_CHECK_OFF(DEVPIC, pDevInsR3);
+    GEN_CHECK_OFF(DEVPIC, pDevInsR0);
+    GEN_CHECK_OFF(DEVPIC, pDevInsRC);
     GEN_CHECK_OFF(DEVPIC, pPicHlpR3);
-    GEN_CHECK_OFF(DEVPIC, pPicHlpGC);
     GEN_CHECK_OFF(DEVPIC, pPicHlpR0);
+    GEN_CHECK_OFF(DEVPIC, pPicHlpRC);
 #ifdef VBOX_WITH_STATISTICS
     GEN_CHECK_OFF(DEVPIC, StatSetIrqGC);
Index: trunk/src/VBox/VMM/PDM.cpp
===================================================================
--- trunk/src/VBox/VMM/PDM.cpp	(revision 11260)
+++ trunk/src/VBox/VMM/PDM.cpp	(revision 11261)
@@ -265,9 +265,9 @@
      * The registered PIC.
      */
-    if (pVM->pdm.s.Pic.pDevInsGC)
-    {
-        pVM->pdm.s.Pic.pDevInsGC            += offDelta;
-        pVM->pdm.s.Pic.pfnSetIrqGC          += offDelta;
-        pVM->pdm.s.Pic.pfnGetInterruptGC    += offDelta;
+    if (pVM->pdm.s.Pic.pDevInsRC)
+    {
+        pVM->pdm.s.Pic.pDevInsRC            += offDelta;
+        pVM->pdm.s.Pic.pfnSetIrqRC          += offDelta;
+        pVM->pdm.s.Pic.pfnGetInterruptRC    += offDelta;
     }
 
Index: trunk/src/VBox/VMM/PDMDevice.cpp
===================================================================
--- trunk/src/VBox/VMM/PDMDevice.cpp	(revision 11260)
+++ trunk/src/VBox/VMM/PDMDevice.cpp	(revision 11261)
@@ -222,5 +222,5 @@
 static DECLCALLBACK(int) pdmR3PicHlp_Lock(PPDMDEVINS pDevIns, int rc);
 static DECLCALLBACK(void) pdmR3PicHlp_Unlock(PPDMDEVINS pDevIns);
-static DECLCALLBACK(PCPDMPICHLPGC) pdmR3PicHlp_GetGCHelpers(PPDMDEVINS pDevIns);
+static DECLCALLBACK(PCPDMPICHLPRC) pdmR3PicHlp_GetRCHelpers(PPDMDEVINS pDevIns);
 static DECLCALLBACK(PCPDMPICHLPR0) pdmR3PicHlp_GetR0Helpers(PPDMDEVINS pDevIns);
 /** @} */
@@ -488,5 +488,5 @@
     pdmR3PicHlp_Lock,
     pdmR3PicHlp_Unlock,
-    pdmR3PicHlp_GetGCHelpers,
+    pdmR3PicHlp_GetRCHelpers,
     pdmR3PicHlp_GetR0Helpers,
     PDM_PICHLPR3_VERSION /* the end */
@@ -2489,7 +2489,9 @@
     PDMDEV_ASSERT_DEVINS(pDevIns);
     VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
-    LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrqHC=%p, .pfnGetInterruptHC=%p, .pszGetIrqGC=%p:{%s}, .pszGetInterruptGC=%p:{%s}} ppPicHlpR3=%p\n",
-             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrqHC, pPicReg->pfnGetInterruptHC,
-             pPicReg->pszSetIrqGC, pPicReg->pszSetIrqGC, pPicReg->pszGetInterruptGC, pPicReg->pszGetInterruptGC, ppPicHlpR3));
+    LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrqR3=%p, .pfnGetInterruptR3=%p, .pszGetIrqRC=%p:{%s}, .pszGetInterruptRC=%p:{%s}, .pszGetIrqR0=%p:{%s}, .pszGetInterruptR0=%p:{%s} } ppPicHlpR3=%p\n",
+             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrqR3, pPicReg->pfnGetInterruptR3,
+             pPicReg->pszSetIrqRC, pPicReg->pszSetIrqRC, pPicReg->pszGetInterruptRC, pPicReg->pszGetInterruptRC,
+             pPicReg->pszSetIrqR0, pPicReg->pszSetIrqR0, pPicReg->pszGetInterruptR0, pPicReg->pszGetInterruptR0,
+             ppPicHlpR3));
 
     /*
@@ -2502,28 +2504,28 @@
         return VERR_INVALID_PARAMETER;
     }
-    if (    !pPicReg->pfnSetIrqHC
-        ||  !pPicReg->pfnGetInterruptHC)
-    {
-        Assert(pPicReg->pfnSetIrqHC);
-        Assert(pPicReg->pfnGetInterruptHC);
-        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (HC callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
+    if (    !pPicReg->pfnSetIrqR3
+        ||  !pPicReg->pfnGetInterruptR3)
+    {
+        Assert(pPicReg->pfnSetIrqR3);
+        Assert(pPicReg->pfnGetInterruptR3);
+        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (R3 callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
         return VERR_INVALID_PARAMETER;
     }
-    if (    (   pPicReg->pszSetIrqGC
-             || pPicReg->pszGetInterruptGC)
-        &&  (   !VALID_PTR(pPicReg->pszSetIrqGC)
-             || !VALID_PTR(pPicReg->pszGetInterruptGC))
+    if (    (   pPicReg->pszSetIrqRC
+             || pPicReg->pszGetInterruptRC)
+        &&  (   !VALID_PTR(pPicReg->pszSetIrqRC)
+             || !VALID_PTR(pPicReg->pszGetInterruptRC))
        )
     {
-        Assert(VALID_PTR(pPicReg->pszSetIrqGC));
-        Assert(VALID_PTR(pPicReg->pszGetInterruptGC));
-        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (GC callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
+        Assert(VALID_PTR(pPicReg->pszSetIrqRC));
+        Assert(VALID_PTR(pPicReg->pszGetInterruptRC));
+        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (RC callbacks)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
         return VERR_INVALID_PARAMETER;
     }
-    if (    pPicReg->pszSetIrqGC
+    if (    pPicReg->pszSetIrqRC
         &&  !(pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC))
     {
         Assert(pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC);
-        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (GC flag)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
+        LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Vrc (RC flag)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
         return VERR_INVALID_PARAMETER;
     }
@@ -2554,14 +2556,14 @@
 
     /*
-     * GC stuff.
-     */
-    if (pPicReg->pszSetIrqGC)
-    {
-        int rc = PDMR3GetSymbolGCLazy(pVM, pDevIns->pDevReg->szGCMod, pPicReg->pszSetIrqGC, &pVM->pdm.s.Pic.pfnSetIrqGC);
-        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szGCMod, pPicReg->pszSetIrqGC, rc));
+     * RC stuff.
+     */
+    if (pPicReg->pszSetIrqRC)
+    {
+        int rc = PDMR3GetSymbolGCLazy(pVM, pDevIns->pDevReg->szGCMod, pPicReg->pszSetIrqRC, &pVM->pdm.s.Pic.pfnSetIrqRC);
+        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szGCMod, pPicReg->pszSetIrqRC, rc));
         if (VBOX_SUCCESS(rc))
         {
-            rc = PDMR3GetSymbolGCLazy(pVM, pDevIns->pDevReg->szGCMod, pPicReg->pszGetInterruptGC, &pVM->pdm.s.Pic.pfnGetInterruptGC);
-            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szGCMod, pPicReg->pszGetInterruptGC, rc));
+            rc = PDMR3GetSymbolGCLazy(pVM, pDevIns->pDevReg->szGCMod, pPicReg->pszGetInterruptRC, &pVM->pdm.s.Pic.pfnGetInterruptRC);
+            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szGCMod, pPicReg->pszGetInterruptRC, rc));
         }
         if (VBOX_FAILURE(rc))
@@ -2570,11 +2572,11 @@
             return rc;
         }
-        pVM->pdm.s.Pic.pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns);
+        pVM->pdm.s.Pic.pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
     }
     else
     {
-        pVM->pdm.s.Pic.pDevInsGC = 0;
-        pVM->pdm.s.Pic.pfnSetIrqGC = 0;
-        pVM->pdm.s.Pic.pfnGetInterruptGC = 0;
+        pVM->pdm.s.Pic.pDevInsRC = 0;
+        pVM->pdm.s.Pic.pfnSetIrqRC = 0;
+        pVM->pdm.s.Pic.pfnGetInterruptRC = 0;
     }
 
@@ -2607,9 +2609,9 @@
 
     /*
-     * HC stuff.
+     * R3 stuff.
      */
     pVM->pdm.s.Pic.pDevInsR3 = pDevIns;
-    pVM->pdm.s.Pic.pfnSetIrqR3 = pPicReg->pfnSetIrqHC;
-    pVM->pdm.s.Pic.pfnGetInterruptR3 = pPicReg->pfnGetInterruptHC;
+    pVM->pdm.s.Pic.pfnSetIrqR3 = pPicReg->pfnSetIrqR3;
+    pVM->pdm.s.Pic.pfnGetInterruptR3 = pPicReg->pfnGetInterruptR3;
     Log(("PDM: Registered PIC device '%s'/%d pDevIns=%p\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pDevIns));
 
@@ -4038,16 +4040,16 @@
 
 
-/** @copydoc PDMPICHLPR3::pfnGetGCHelpers */
-static DECLCALLBACK(PCPDMPICHLPGC) pdmR3PicHlp_GetGCHelpers(PPDMDEVINS pDevIns)
+/** @copydoc PDMPICHLPR3::pfnGetRCHelpers */
+static DECLCALLBACK(PCPDMPICHLPRC) pdmR3PicHlp_GetRCHelpers(PPDMDEVINS pDevIns)
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
     VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
-    RTGCPTR32 pGCHelpers = 0;
-    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCPicHlp", &pGCHelpers);
+    RTRCPTR pRCHelpers = 0;
+    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmRCPicHlp", &pRCHelpers);
     AssertReleaseRC(rc);
-    AssertRelease(pGCHelpers);
-    LogFlow(("pdmR3PicHlp_GetGCHelpers: caller='%s'/%d: returns %VGv\n",
-             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pGCHelpers));
-    return pGCHelpers;
+    AssertRelease(pRCHelpers);
+    LogFlow(("pdmR3PicHlp_GetRCHelpers: caller='%s'/%d: returns %VGv\n",
+             pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pRCHelpers));
+    return pRCHelpers;
 }
 
Index: trunk/src/VBox/VMM/PDMInternal.h
===================================================================
--- trunk/src/VBox/VMM/PDMInternal.h	(revision 11260)
+++ trunk/src/VBox/VMM/PDMInternal.h	(revision 11261)
@@ -368,12 +368,12 @@
     DECLR0CALLBACKMEMBER(int, pfnGetInterruptR0,(PPDMDEVINS pDevIns));
 
-    /** Pointer to the PIC device instance - GC. */
-    RCPTRTYPE(PPDMDEVINS)   pDevInsGC;
+    /** Pointer to the PIC device instance - RC. */
+    RCPTRTYPE(PPDMDEVINS)   pDevInsRC;
     /** @copydoc PDMPICREG::pfnSetIrqHC */
-    DECLRCCALLBACKMEMBER(void, pfnSetIrqGC,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
+    DECLRCCALLBACKMEMBER(void, pfnSetIrqRC,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
     /** @copydoc PDMPICREG::pfnGetInterruptHC */
-    DECLRCCALLBACKMEMBER(int, pfnGetInterruptGC,(PPDMDEVINS pDevIns));
+    DECLRCCALLBACKMEMBER(int, pfnGetInterruptRC,(PPDMDEVINS pDevIns));
     /** Alignment padding. */
-    RTRCPTR                 GCPtrPadding;
+    RTRCPTR                 RCPtrPadding;
 } PDMPIC;
 
@@ -455,6 +455,6 @@
     DECLR0CALLBACKMEMBER(void,      pfnSetIrqR0,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
 
-    /** Pointer to the APIC device instance - GC Ptr. */
-    PPDMDEVINSGC                    pDevInsRC;
+    /** Pointer to the APIC device instance - RC Ptr. */
+    PPDMDEVINSRC                    pDevInsRC;
     /** @copydoc PDMIOAPICREG::pfnSetIrqR3 */
     DECLRCCALLBACKMEMBER(void,      pfnSetIrqRC,(PPDMDEVINS pDevIns, int iIrq, int iLevel));
@@ -496,5 +496,5 @@
 
     /** Pointer to PCI Bus device instance. */
-    PPDMDEVINSGC                    pDevInsRC;
+    PPDMDEVINSRC                    pDevInsRC;
     /** @copydoc PDMPCIBUSREG::pfnSetIrqR3 */
     DECLRCCALLBACKMEMBER(void,      pfnSetIrqRC,(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, int iIrq, int iLevel));
Index: trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 11260)
+++ trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 11261)
@@ -71,7 +71,7 @@
     {
         VM_FF_CLEAR(pVM, VM_FF_INTERRUPT_PIC);
-        Assert(pVM->pdm.s.Pic.CTXALLSUFF(pDevIns));
-        Assert(pVM->pdm.s.Pic.CTXALLSUFF(pfnGetInterrupt));
-        int i = pVM->pdm.s.Pic.CTXALLSUFF(pfnGetInterrupt)(pVM->pdm.s.Pic.CTXALLSUFF(pDevIns));
+        Assert(pVM->pdm.s.Pic.CTX_SUFF(pDevIns));
+        Assert(pVM->pdm.s.Pic.CTX_SUFF(pfnGetInterrupt));
+        int i = pVM->pdm.s.Pic.CTX_SUFF(pfnGetInterrupt)(pVM->pdm.s.Pic.CTX_SUFF(pDevIns));
         AssertMsg(i <= 255 && i >= 0, ("i=%d\n", i));
         if (i >= 0)
@@ -103,8 +103,8 @@
 
     int rc = VERR_PDM_NO_PIC_INSTANCE;
-    if (pVM->pdm.s.Pic.CTXALLSUFF(pDevIns))
-    {
-        Assert(pVM->pdm.s.Pic.CTXALLSUFF(pfnSetIrq));
-        pVM->pdm.s.Pic.CTXALLSUFF(pfnSetIrq)(pVM->pdm.s.Pic.CTXALLSUFF(pDevIns), u8Irq, u8Level);
+    if (pVM->pdm.s.Pic.CTX_SUFF(pDevIns))
+    {
+        Assert(pVM->pdm.s.Pic.CTX_SUFF(pfnSetIrq));
+        pVM->pdm.s.Pic.CTX_SUFF(pfnSetIrq)(pVM->pdm.s.Pic.CTX_SUFF(pDevIns), u8Irq, u8Level);
         rc = VINF_SUCCESS;
     }
Index: trunk/src/VBox/VMM/VMMGC/PDMGCDevice.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMGC/PDMGCDevice.cpp	(revision 11260)
+++ trunk/src/VBox/VMM/VMMGC/PDMGCDevice.cpp	(revision 11261)
@@ -60,5 +60,5 @@
 __BEGIN_DECLS
 extern DECLEXPORT(const PDMDEVHLPGC)    g_pdmGCDevHlp;
-extern DECLEXPORT(const PDMPICHLPGC)    g_pdmGCPicHlp;
+extern DECLEXPORT(const PDMPICHLPRC)    g_pdmRCPicHlp;
 extern DECLEXPORT(const PDMAPICHLPRC)   g_pdmRCApicHlp;
 extern DECLEXPORT(const PDMIOAPICHLPRC) g_pdmRCIoApicHlp;
@@ -89,8 +89,8 @@
  * @{
  */
-static DECLCALLBACK(void) pdmGCPicHlp_SetInterruptFF(PPDMDEVINS pDevIns);
-static DECLCALLBACK(void) pdmGCPicHlp_ClearInterruptFF(PPDMDEVINS pDevIns);
-static DECLCALLBACK(int) pdmGCPicHlp_Lock(PPDMDEVINS pDevIns, int rc);
-static DECLCALLBACK(void) pdmGCPicHlp_Unlock(PPDMDEVINS pDevIns);
+static DECLCALLBACK(void) pdmRCPicHlp_SetInterruptFF(PPDMDEVINS pDevIns);
+static DECLCALLBACK(void) pdmRCPicHlp_ClearInterruptFF(PPDMDEVINS pDevIns);
+static DECLCALLBACK(int) pdmRCPicHlp_Lock(PPDMDEVINS pDevIns, int rc);
+static DECLCALLBACK(void) pdmRCPicHlp_Unlock(PPDMDEVINS pDevIns);
 /** @} */
 
@@ -152,14 +152,14 @@
 
 /**
- * The Guest Context PIC Helper Callbacks.
- */
-extern DECLEXPORT(const PDMPICHLPGC) g_pdmGCPicHlp =
-{
-    PDM_PICHLPGC_VERSION,
-    pdmGCPicHlp_SetInterruptFF,
-    pdmGCPicHlp_ClearInterruptFF,
-    pdmGCPicHlp_Lock,
-    pdmGCPicHlp_Unlock,
-    PDM_PICHLPGC_VERSION
+ * The Raw-Mode Context PIC Helper Callbacks.
+ */
+extern DECLEXPORT(const PDMPICHLPRC) g_pdmRCPicHlp =
+{
+    PDM_PICHLPRC_VERSION,
+    pdmRCPicHlp_SetInterruptFF,
+    pdmRCPicHlp_ClearInterruptFF,
+    pdmRCPicHlp_Lock,
+    pdmRCPicHlp_Unlock,
+    PDM_PICHLPRC_VERSION
 };
 
@@ -353,8 +353,8 @@
 
 /** @copydoc PDMPICHLPGC::pfnSetInterruptFF */
-static DECLCALLBACK(void) pdmGCPicHlp_SetInterruptFF(PPDMDEVINS pDevIns)
-{
-    PDMDEV_ASSERT_DEVINS(pDevIns);
-    LogFlow(("pdmGCPicHlp_SetInterruptFF: caller=%p/%d: VM_FF_INTERRUPT_PIC %d -> 1\n",
+static DECLCALLBACK(void) pdmRCPicHlp_SetInterruptFF(PPDMDEVINS pDevIns)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmRCPicHlp_SetInterruptFF: caller=%p/%d: VM_FF_INTERRUPT_PIC %d -> 1\n",
              pDevIns, pDevIns->iInstance, VM_FF_ISSET(pDevIns->Internal.s.pVMGC, VM_FF_INTERRUPT_PIC)));
     VM_FF_SET(pDevIns->Internal.s.pVMGC, VM_FF_INTERRUPT_PIC);
@@ -363,8 +363,8 @@
 
 /** @copydoc PDMPICHLPGC::pfnClearInterruptFF */
-static DECLCALLBACK(void) pdmGCPicHlp_ClearInterruptFF(PPDMDEVINS pDevIns)
-{
-    PDMDEV_ASSERT_DEVINS(pDevIns);
-    LogFlow(("pdmGCPicHlp_ClearInterruptFF: caller=%p/%d: VM_FF_INTERRUPT_PIC %d -> 0\n",
+static DECLCALLBACK(void) pdmRCPicHlp_ClearInterruptFF(PPDMDEVINS pDevIns)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmRCPicHlp_ClearInterruptFF: caller=%p/%d: VM_FF_INTERRUPT_PIC %d -> 0\n",
              pDevIns, pDevIns->iInstance, VM_FF_ISSET(pDevIns->Internal.s.pVMGC, VM_FF_INTERRUPT_PIC)));
     VM_FF_CLEAR(pDevIns->Internal.s.pVMGC, VM_FF_INTERRUPT_PIC);
@@ -373,5 +373,5 @@
 
 /** @copydoc PDMPICHLPGC::pfnLock */
-static DECLCALLBACK(int) pdmGCPicHlp_Lock(PPDMDEVINS pDevIns, int rc)
+static DECLCALLBACK(int) pdmRCPicHlp_Lock(PPDMDEVINS pDevIns, int rc)
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
@@ -381,5 +381,5 @@
 
 /** @copydoc PDMPICHLPGC::pfnUnlock */
-static DECLCALLBACK(void) pdmGCPicHlp_Unlock(PPDMDEVINS pDevIns)
+static DECLCALLBACK(void) pdmRCPicHlp_Unlock(PPDMDEVINS pDevIns)
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
@@ -518,10 +518,10 @@
     if (    (   pVM->pdm.s.IoApic.pDevInsRC
              || !pVM->pdm.s.IoApic.pDevInsR3)
-        &&  (   pVM->pdm.s.Pic.pDevInsGC
+        &&  (   pVM->pdm.s.Pic.pDevInsRC
              || !pVM->pdm.s.Pic.pDevInsR3))
     {
         pdmLock(pVM);
-        if (pVM->pdm.s.Pic.pDevInsGC)
-            pVM->pdm.s.Pic.pfnSetIrqGC(pVM->pdm.s.Pic.pDevInsGC, iIrq, iLevel);
+        if (pVM->pdm.s.Pic.pDevInsRC)
+            pVM->pdm.s.Pic.pfnSetIrqRC(pVM->pdm.s.Pic.pDevInsRC, iIrq, iLevel);
         if (pVM->pdm.s.IoApic.pDevInsRC)
             pVM->pdm.s.IoApic.pfnSetIrqRC(pVM->pdm.s.IoApic.pDevInsRC, iIrq, iLevel);
Index: trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
===================================================================
--- trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp	(revision 11260)
+++ trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp	(revision 11261)
@@ -257,7 +257,7 @@
     GEN_CHECK_OFF(PDM, Pic.pfnSetIrqR0);
     GEN_CHECK_OFF(PDM, Pic.pfnGetInterruptR0);
-    GEN_CHECK_OFF(PDM, Pic.pDevInsGC);
-    GEN_CHECK_OFF(PDM, Pic.pfnSetIrqGC);
-    GEN_CHECK_OFF(PDM, Pic.pfnGetInterruptGC);
+    GEN_CHECK_OFF(PDM, Pic.pDevInsRC);
+    GEN_CHECK_OFF(PDM, Pic.pfnSetIrqRC);
+    GEN_CHECK_OFF(PDM, Pic.pfnGetInterruptRC);
     GEN_CHECK_OFF(PDM, Apic);
     GEN_CHECK_OFF(PDM, Apic.pDevInsR3);
