Changeset 56969 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Jul 17, 2015 1:38:14 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r56944 r56969 5519 5519 vga_save(pSSM, PDMINS_2_DATA(pDevIns, PVGASTATE)); 5520 5520 5521 VGA_SAVED_STATE_PUT_MARKER(pSSM, 1); 5521 5522 #ifdef VBOX_WITH_HGSMI 5522 5523 SSMR3PutBool(pSSM, true); … … 5528 5529 AssertRCReturn(rc, rc); 5529 5530 5531 VGA_SAVED_STATE_PUT_MARKER(pSSM, 3); 5530 5532 #ifdef VBOX_WITH_VDMA 5531 5533 rc = SSMR3PutU32(pSSM, 1); … … 5541 5543 #endif 5542 5544 5545 VGA_SAVED_STATE_PUT_MARKER(pSSM, 5); 5543 5546 #ifdef VBOX_WITH_VMSVGA 5544 5547 if (pThis->fVMSVGAEnabled) … … 5548 5551 } 5549 5552 #endif 5553 VGA_SAVED_STATE_PUT_MARKER(pSSM, 6); 5550 5554 5551 5555 return rc; … … 5585 5589 if (RT_FAILURE(rc)) 5586 5590 return rc; 5591 5592 /* 5593 * Restore the HGSMI state, if present. 5594 */ 5595 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, 1); 5587 5596 bool fWithHgsmi = uVersion == VGA_SAVEDSTATE_VERSION_HGSMI; 5588 5597 if (uVersion > VGA_SAVEDSTATE_VERSION_HGSMI) … … 5601 5610 } 5602 5611 5612 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, 3); 5603 5613 if (uVersion >= VGA_SAVEDSTATE_VERSION_3D) 5604 5614 { … … 5622 5632 } 5623 5633 5634 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, 5); 5624 5635 #ifdef VBOX_WITH_VMSVGA 5625 5636 if (pThis->fVMSVGAEnabled) … … 5629 5640 } 5630 5641 #endif 5642 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, 6); 5631 5643 } 5632 5644 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Graphics/DevVGASavedState.h
r56292 r56969 20 20 21 21 22 #ifndef Graphics_DevVGASavedState_h23 #define Graphics_DevVGASavedState_h22 #ifndef ___Graphics_DevVGASavedState_h 23 #define ___Graphics_DevVGASavedState_h 24 24 25 #define VGA_SAVEDSTATE_VERSION 15 25 /** Creates an eyecatching marker in the VGA saved state ("<uSub>Marker\n"). */ 26 #define VGA_SAVED_STATE_MAKE_MARKER(uSub) (UINT64_C(0x0a72656b72614d30) + (uint64_t)(uSub)) 27 28 /** Puts a marker. Status code is not checked. */ 29 #define VGA_SAVED_STATE_PUT_MARKER(pSSM, uSub) \ 30 do { SSMR3PutU64(pSSM, VGA_SAVED_STATE_MAKE_MARKER(uSub)); } while (0) 31 32 /** Retrieves a VGA saved state marker and checks that it matches, if it 33 * doesn't assert/LogRel and return. */ 34 #define VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, uSub) \ 35 do { \ 36 if (uVersion >= VGA_SAVEDSTATE_VERSION_MARKERS) \ 37 { \ 38 uint64_t uMarker; \ 39 int rcMarker = SSMR3GetU64(pSSM, &uMarker); \ 40 AssertLogRelRCReturn(rc, rc); \ 41 AssertLogRelMsgReturn(uMarker == VGA_SAVED_STATE_MAKE_MARKER(uSub), \ 42 ("Bad VGA marker: expected %llx, got %llx\n", VGA_SAVED_STATE_MAKE_MARKER(uSub), uMarker), \ 43 VERR_SSM_DATA_UNIT_FORMAT_CHANGED); \ 44 } \ 45 } while (0) 46 47 #define VGA_SAVEDSTATE_VERSION 16 48 #define VGA_SAVEDSTATE_VERSION_MARKERS 16 26 49 #define VGA_SAVEDSTATE_VERSION_MODE_HINTS 15 27 50 #define VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA 14 … … 41 64 42 65 #endif 66 -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r56814 r56969 1603 1603 if (RT_SUCCESS(rc)) 1604 1604 { 1605 VGA_SAVED_STATE_PUT_MARKER(pSSM, 2); 1606 1605 1607 /* Save VBVACONTEXT. */ 1606 1608 VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext (pIns); … … 1781 1783 } 1782 1784 1783 int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u 32Version)1784 { 1785 if (u 32Version < VGA_SAVEDSTATE_VERSION_HGSMI)1785 int vboxVBVALoadStateExec (PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion) 1786 { 1787 if (uVersion < VGA_SAVEDSTATE_VERSION_HGSMI) 1786 1788 { 1787 1789 /* Nothing was saved. */ … … 1791 1793 PVGASTATE pVGAState = PDMINS_2_DATA(pDevIns, PVGASTATE); 1792 1794 PHGSMIINSTANCE pIns = pVGAState->pHGSMI; 1793 int rc = HGSMIHostLoadStateExec (pIns, pSSM, u 32Version);1795 int rc = HGSMIHostLoadStateExec (pIns, pSSM, uVersion); 1794 1796 if (RT_SUCCESS(rc)) 1795 1797 { 1798 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pSSM, uVersion, 2); 1799 1796 1800 /* Load VBVACONTEXT. */ 1797 1801 VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext (pIns); … … 1879 1883 } 1880 1884 1881 if (u 32Version > VGA_SAVEDSTATE_VERSION_WITH_CONFIG)1885 if (uVersion > VGA_SAVEDSTATE_VERSION_WITH_CONFIG) 1882 1886 { 1883 1887 /* Read mouse pointer shape information. */ … … 1933 1937 } 1934 1938 1935 if (u 32Version >= VGA_SAVEDSTATE_VERSION_MODE_HINTS)1939 if (uVersion >= VGA_SAVEDSTATE_VERSION_MODE_HINTS) 1936 1940 { 1937 1941 uint32_t cModeHints, cbModeHints; … … 1958 1962 LogFlowFunc(("%d views loaded\n", pCtx->cViews)); 1959 1963 1960 if (u 32Version > VGA_SAVEDSTATE_VERSION_WDDM)1964 if (uVersion > VGA_SAVEDSTATE_VERSION_WDDM) 1961 1965 { 1962 1966 bool fLoadCommands; 1963 1967 1964 if (u 32Version < VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)1968 if (uVersion < VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA) 1965 1969 { 1966 1970 const char *pcszOsArch = SSMR3HandleHostOSAndArch(pSSM); … … 1988 1992 if (fLoadCommands) 1989 1993 { 1990 rc = vbvaVHWACommandLoadPending(pVGAState, pSSM, u 32Version);1994 rc = vbvaVHWACommandLoadPending(pVGAState, pSSM, uVersion); 1991 1995 AssertRCReturn(rc, rc); 1992 1996 } -
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r56292 r56969 1382 1382 return rc; 1383 1383 } 1384 VGA_SAVED_STATE_PUT_MARKER(pCmd->u.state.pSSM, 4); 1385 1384 1386 return pVdma->CrSrvInfo.pfnSaveState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM); 1385 1387 } … … 1396 1398 } 1397 1399 1400 VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pCmd->u.state.pSSM, pCmd->u.state.u32Version, 4); 1398 1401 rc = pVdma->CrSrvInfo.pfnLoadState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM, pCmd->u.state.u32Version); 1399 1402 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.