VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/DevVGASavedState.h@ 59176

Last change on this file since 59176 was 56969, checked in by vboxsync, 9 years ago

DevVGA: Added markers to the saved state that separates various parts so we can more easily pin down load troubles when reading the log file.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: DevVGASavedState.h 56969 2015-07-17 13:38:14Z vboxsync $ */
2/** @file
3 * DevVGA - Saved state versions.
4 *
5 * @remarks HGSMI needs this but doesn't want to deal with DevVGA.h, thus this
6 * dedicated header.
7 */
8
9/*
10 * Copyright (C) 2006-2015 Oracle Corporation
11 *
12 * This file is part of VirtualBox Open Source Edition (OSE), as
13 * available from http://www.virtualbox.org. This file is free software;
14 * you can redistribute it and/or modify it under the terms of the GNU
15 * General Public License (GPL) as published by the Free Software
16 * Foundation, in version 2 as it comes in the "COPYING" file of the
17 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19 */
20
21
22#ifndef ___Graphics_DevVGASavedState_h
23#define ___Graphics_DevVGASavedState_h
24
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
49#define VGA_SAVEDSTATE_VERSION_MODE_HINTS 15
50#define VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA 14
51#define VGA_SAVEDSTATE_VERSION_3D 13
52#define VGA_SAVEDSTATE_VERSION_HGSMIMA 12 /* HGSMI memory allocator. */
53#define VGA_SAVEDSTATE_VERSION_VMSVGA_2D 10 /* <- internal build with 2d state only */
54#define VGA_SAVEDSTATE_VERSION_WITH_PENDVHWA 10
55#define VGA_SAVEDSTATE_VERSION_INV_GCMDFIFO 8 /* <- states upto and including this version may contain invalid completed Guest Commands fifo entries */
56#define VGA_SAVEDSTATE_VERSION_INV_VHEIGHT 8 /* <- states upto and including this version may contain invalid vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] value */
57#define VGA_SAVEDSTATE_VERSION_WDDM 7
58#define VGA_SAVEDSTATE_VERSION_PRE_WDDM 6
59#define VGA_SAVEDSTATE_VERSION_HOST_HEAP 5
60#define VGA_SAVEDSTATE_VERSION_WITH_CONFIG 4
61#define VGA_SAVEDSTATE_VERSION_HGSMI 3
62#define VGA_SAVEDSTATE_VERSION_PRE_HGSMI 2
63#define VGA_SAVEDSTATE_VERSION_ANCIENT 1
64
65#endif
66
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette