Changeset 11944
- Timestamp:
- 09/01/08 19:33:18 (3 months ago)
- Files:
-
- trunk/include/VBox/ssm.h (modified) (2 diffs)
- trunk/src/VBox/VMM/SSM.cpp (modified) (3 diffs)
- trunk/src/VBox/VMM/VMM.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/VBox/ssm.h
r11808 r11944 459 459 SSMR3DECL(int) SSMR3PutGCPtr(PSSMHANDLE pSSM, RTGCPTR GCPtr); 460 460 SSMR3DECL(int) SSMR3PutGCUIntPtr(PSSMHANDLE pSSM, RTGCUINTPTR GCPtr); 461 SSMR3DECL(int) SSMR3PutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr); 461 462 SSMR3DECL(int) SSMR3PutHCUInt(PSSMHANDLE pSSM, RTHCUINT u); 462 463 SSMR3DECL(int) SSMR3PutHCSInt(PSSMHANDLE pSSM, RTHCINT i); … … 493 494 SSMR3DECL(int) SSMR3GetGCPtr(PSSMHANDLE pSSM, PRTGCPTR pGCPtr); 494 495 SSMR3DECL(int) SSMR3GetGCUIntPtr(PSSMHANDLE pSSM, PRTGCUINTPTR pGCPtr); 496 SSMR3DECL(int) SSMR3GetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr); 495 497 SSMR3DECL(int) SSMR3GetIOPort(PSSMHANDLE pSSM, PRTIOPORT pIOPort); 496 498 SSMR3DECL(int) SSMR3GetHCUInt(PSSMHANDLE pSSM, PRTHCUINT pu); trunk/src/VBox/VMM/SSM.cpp
r11808 r11944 2315 2315 2316 2316 /** 2317 * Saves an RC virtual address item to the current data unit. 2318 * 2319 * @returns VBox status. 2320 * @param pSSM SSM operation handle. 2321 * @param RCPtr The item to save. 2322 */ 2323 SSMR3DECL(int) SSMR3PutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr) 2324 { 2325 if (pSSM->enmOp == SSMSTATE_SAVE_EXEC) 2326 return ssmr3Write(pSSM, &RCPtr, sizeof(RCPtr)); 2327 AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp)); 2328 return VERR_SSM_INVALID_STATE; 2329 } 2330 2331 2332 /** 2317 2333 * Saves a GC virtual address (represented as an unsigned integer) item to the current data unit. 2318 2334 * … … 2899 2915 { 2900 2916 Assert(cbGCPtr == sizeof(RTGCPTR32) || cbGCPtr == sizeof(RTGCPTR64)); 2917 Log(("SSMR3SetGCPtrSize %d bytes\n", cbGCPtr)); 2901 2918 pSSM->cbGCPtr = cbGCPtr; 2902 2919 return VINF_SUCCESS; … … 2930 2947 } 2931 2948 2949 /** 2950 * Loads an RC virtual address item from the current data unit. 2951 * 2952 * @returns VBox status. 2953 * @param pSSM SSM operation handle. 2954 * @param pRCPtr Where to store the RC virtual address. 2955 */ 2956 SSMR3DECL(int) SSMR3GetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr) 2957 { 2958 if (pSSM->enmOp == SSMSTATE_LOAD_EXEC || pSSM->enmOp == SSMSTATE_OPEN_READ) 2959 return ssmr3Read(pSSM, pRCPtr, sizeof(*pRCPtr)); 2960 2961 AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp)); 2962 return VERR_SSM_INVALID_STATE; 2963 } 2932 2964 2933 2965 /** trunk/src/VBox/VMM/VMM.cpp
r11894 r11944 1606 1606 * The hypervisor stack. 1607 1607 */ 1608 SSMR3Put GCPtr(pSSM, pVM->vmm.s.pbGCStackBottom);1609 RT GCPTR GCPtrESP = CPUMGetHyperESP(pVM);1608 SSMR3PutRCPtr(pSSM, pVM->vmm.s.pbGCStackBottom); 1609 RTRCPTR GCPtrESP = CPUMGetHyperESP(pVM); 1610 1610 AssertMsg(pVM->vmm.s.pbGCStackBottom - GCPtrESP <= VMM_STACK_SIZE, ("Bottom %VGv ESP=%VGv\n", pVM->vmm.s.pbGCStackBottom, GCPtrESP)); 1611 SSMR3Put GCPtr(pSSM, GCPtrESP);1611 SSMR3PutRCPtr(pSSM, GCPtrESP); 1612 1612 SSMR3PutMem(pSSM, pVM->vmm.s.pbHCStack, VMM_STACK_SIZE); 1613 1613 return SSMR3PutU32(pSSM, ~0); /* terminator */ … … 1639 1639 * Check that the stack is in the same place, or that it's fearly empty. 1640 1640 */ 1641 RT GCPTR GCPtrStackBottom;1642 SSMR3Get GCPtr(pSSM, &GCPtrStackBottom);1643 RT GCPTR GCPtrESP;1644 int rc = SSMR3Get GCPtr(pSSM, &GCPtrESP);1641 RTRCPTR GCPtrStackBottom; 1642 SSMR3GetRCPtr(pSSM, &GCPtrStackBottom); 1643 RTRCPTR GCPtrESP; 1644 int rc = SSMR3GetRCPtr(pSSM, &GCPtrESP); 1645 1645 if (VBOX_FAILURE(rc)) 1646 1646 return rc; … … 1670 1670 } 1671 1671 1672 LogRel(("The stack is not in the same place and it's not empty! GCPtrStackBottom=%V Gv pbGCStackBottom=%VGv ESP=%VGv\n",1672 LogRel(("The stack is not in the same place and it's not empty! GCPtrStackBottom=%VRv pbGCStackBottom=%VRv ESP=%VRv\n", 1673 1673 GCPtrStackBottom, pVM->vmm.s.pbGCStackBottom, GCPtrESP)); 1674 1674 if (SSMR3HandleGetAfter(pSSM) == SSMAFTER_DEBUG_IT)

