Index: trunk/src/VBox/Devices/PC/DevACPI.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 22480)
@@ -1774,8 +1774,9 @@
 
 static DECLCALLBACK(int) acpi_load_state(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle,
-                                         uint32_t u32Version)
+                                         uint32_t uVersion, uint32_t uPhase)
 {
     ACPIState *s = PDMINS_2_DATA(pDevIns, ACPIState *);
-    int rc;
+
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
 
     /*
@@ -1783,9 +1784,9 @@
      * after state successfully loaded.
      */
-    rc = acpiUnregisterPmHandlers(s);
+    int rc = acpiUnregisterPmHandlers(s);
     if (RT_FAILURE(rc))
         return rc;
 
-    switch (u32Version)
+    switch (uVersion)
     {
         case 4:
@@ -2182,6 +2183,5 @@
                                    acpiPciConfigWrite, &s->pfnAcpiPciConfigWrite);
 
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 5, sizeof(*s),
-                              NULL, acpi_save_state, NULL, NULL, acpi_load_state,  NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, 5, sizeof(*s), acpi_save_state, acpi_load_state);
     if (RT_FAILURE(rc))
         return rc;
Index: trunk/src/VBox/Devices/PC/DevAPIC.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevAPIC.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevAPIC.cpp	(revision 22480)
@@ -2357,10 +2357,12 @@
  * @copydoc FNSSMDEVLOADEXEC
  */
-static DECLCALLBACK(int) apicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
+static DECLCALLBACK(int) apicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
 {
     APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
-    /* load all APICs data, @todo: is it correct? */
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
+
+    /* load all APICs data */ /** @todo: is it correct? */
     foreach_apic(dev, 0xffffffff,
-                 if (apic_load(pSSMHandle, apic, u32Version))
+                 if (apic_load(pSSMHandle, apic, uVersion))
                  {
                       AssertFailed();
@@ -2640,6 +2642,5 @@
      * Saved state.
      */
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 2 /* version */,
-                              sizeof(*pThis), NULL, apicSaveExec, NULL, NULL, apicLoadExec, NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, 2 /* version */, sizeof(*pThis), apicSaveExec, apicLoadExec);
     if (RT_FAILURE(rc))
         return rc;
@@ -2807,12 +2808,13 @@
  * @copydoc FNSSMDEVLOADEXEC
  */
-static DECLCALLBACK(int) ioapicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
+static DECLCALLBACK(int) ioapicLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
 {
     IOAPICState *s = PDMINS_2_DATA(pDevIns, IOAPICState *);
 
-    if (ioapic_load(pSSMHandle, s, u32Version)) {
+    if (ioapic_load(pSSMHandle, s, uVersion)) {
         AssertFailed();
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
     }
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
 
     return VINF_SUCCESS;
@@ -2919,6 +2921,5 @@
     }
 
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 1 /* version */,
-                              sizeof(*s), NULL, ioapicSaveExec, NULL, NULL, ioapicLoadExec, NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, 1 /* version */, sizeof(*s), ioapicSaveExec, ioapicLoadExec);
     if (RT_FAILURE(rc))
         return rc;
Index: trunk/src/VBox/Devices/PC/DevDMA.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevDMA.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevDMA.cpp	(revision 22480)
@@ -846,5 +846,5 @@
 }
 
-static void DMAReset (PPDMDEVINS pDevIns)
+static void dmaReset (PPDMDEVINS pDevIns)
 {
     DMAState *s = PDMINS_2_DATA (pDevIns, DMAState *);
@@ -853,5 +853,5 @@
 }
 
-static DECLCALLBACK(int) SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle)
+static DECLCALLBACK(int) dmaSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle)
 {
     DMAState *s = PDMINS_2_DATA (pDevIns, DMAState *);
@@ -861,17 +861,16 @@
 }
 
-static DECLCALLBACK(int) LoadExec (PPDMDEVINS pDevIns,
-                                   PSSMHANDLE pSSMHandle,
-                                   uint32_t u32Version)
+static DECLCALLBACK(int) dmaLoadExec (PPDMDEVINS pDevIns,
+                                      PSSMHANDLE pSSMHandle,
+                                      uint32_t uVersion,
+                                      uint32_t uPhase)
 {
     DMAState *s = PDMINS_2_DATA (pDevIns, DMAState *);
 
-    if (u32Version != 1) {
-        AssertFailed ();
-        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-    }
-
-    dma_load (pSSMHandle, &s->dma_controllers[0], u32Version);
-    return dma_load (pSSMHandle, &s->dma_controllers[1], u32Version);
+    AssertMsgReturn (uVersion == 1, ("%d\n", uVersion), VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION);
+    Assert (uPhase == SSM_PHASE_FINAL);
+
+    dma_load (pSSMHandle, &s->dma_controllers[0], uVersion);
+    return dma_load (pSSMHandle, &s->dma_controllers[1], uVersion);
 }
 
@@ -889,5 +888,5 @@
  *                      iInstance it's expected to be used a bit in this function.
  */
-static DECLCALLBACK(int) DMAConstruct(PPDMDEVINS pDevIns,
+static DECLCALLBACK(int) dmaConstruct(PPDMDEVINS pDevIns,
                                       int iInstance,
                                       PCFGMNODE pCfgHandle)
@@ -932,6 +931,5 @@
     }
 
-    rc = PDMDevHlpSSMRegister (pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 1, sizeof (*s),
-                               NULL, SaveExec, NULL, NULL, LoadExec, NULL);
+    rc = PDMDevHlpSSMRegister (pDevIns, 1 /*uVersion*/, sizeof (*s), dmaSaveExec, dmaLoadExec);
     if (RT_FAILURE(rc))
         return rc;
@@ -964,5 +962,5 @@
     sizeof(DMAState),
     /* pfnConstruct */
-    DMAConstruct,
+    dmaConstruct,
     /* pfnDestruct */
     NULL,
@@ -974,5 +972,5 @@
     NULL,
     /* pfnReset */
-    DMAReset,
+    dmaReset,
     /* pfnSuspend */
     NULL,
Index: trunk/src/VBox/Devices/PC/DevPIC.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevPIC.cpp	(revision 22480)
@@ -828,12 +828,14 @@
  * @param   pDevIns     The device instance.
  * @param   pSSMHandle  The handle to the saved state.
- * @param   u32Version  The data unit version number.
- */
-static DECLCALLBACK(int) picLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
+ * @param   uVersion    The data unit version number.
+ * @param   uPhase      The data phase.
+ */
+static DECLCALLBACK(int) picLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
 {
     PDEVPIC pThis = PDMINS_2_DATA(pDevIns, PDEVPIC);
 
-    if (u32Version != 1)
+    if (uVersion != 1)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
 
     for (unsigned i = 0; i < RT_ELEMENTS(pThis->aPics); i++)
@@ -1041,7 +1043,5 @@
     }
 
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 1 /* version */, sizeof(*pThis),
-                              NULL, picSaveExec, NULL,
-                              NULL, picLoadExec, NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, 1 /* uVersion */, sizeof(*pThis), picSaveExec, picLoadExec);
     if (RT_FAILURE(rc))
         return rc;
Index: trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevPit-i8254.cpp	(revision 22480)
@@ -759,15 +759,16 @@
  * @param   pDevIns     The device instance.
  * @param   pSSMHandle  The handle to the saved state.
- * @param   u32Version  The data unit version number.
- */
-static DECLCALLBACK(int) pitLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
+ * @param   uVersion    The data unit version number.
+ * @param   uPhase      The data phase.
+ */
+static DECLCALLBACK(int) pitLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
 {
     PITState *pThis = PDMINS_2_DATA(pDevIns, PITState *);
-    unsigned i;
-
-    if (u32Version != PIT_SAVED_STATE_VERSION)
+
+    if (uVersion != PIT_SAVED_STATE_VERSION)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
-
-    for (i = 0; i < RT_ELEMENTS(pThis->channels); i++)
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
+
+    for (unsigned i = 0; i < RT_ELEMENTS(pThis->channels); i++)
     {
         PITChannelState *s = &pThis->channels[i];
@@ -1034,7 +1035,5 @@
     }
 
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, PIT_SAVED_STATE_VERSION, sizeof(*pThis),
-                                          NULL, pitSaveExec, NULL,
-                                          NULL, pitLoadExec, NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, PIT_SAVED_STATE_VERSION, sizeof(*pThis), pitSaveExec, pitLoadExec);
     if (RT_FAILURE(rc))
         return rc;
Index: trunk/src/VBox/Devices/PC/DevRTC.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevRTC.cpp	(revision 22277)
+++ trunk/src/VBox/Devices/PC/DevRTC.cpp	(revision 22480)
@@ -628,12 +628,14 @@
  * @param   pDevIns     The device instance.
  * @param   pSSMHandle  The handle to the saved state.
- * @param   u32Version  The data unit version number.
- */
-static DECLCALLBACK(int) rtcLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
+ * @param   uVersion    The data unit version number.
+ * @param   uPhase      The data phase.
+ */
+static DECLCALLBACK(int) rtcLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
 {
     RTCState *pThis = PDMINS_2_DATA(pDevIns, RTCState *);
 
-    if (u32Version != 1)
+    if (uVersion != 1)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
+    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
 
     SSMR3GetMem(pSSMHandle, pThis->cmos_data, 128);
@@ -916,7 +918,5 @@
     }
 
-    rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance, 1 /* version */, sizeof(*pThis),
-                              NULL, rtcSaveExec, NULL,
-                              NULL, rtcLoadExec, NULL);
+    rc = PDMDevHlpSSMRegister(pDevIns, 1 /* version */, sizeof(*pThis), rtcSaveExec, rtcLoadExec);
     if (RT_FAILURE(rc))
         return rc;
