VirtualBox

source: vbox/trunk/include/VBox/ssm.h@ 20663

Last change on this file since 20663 was 20374, checked in by vboxsync, 16 years ago

*: s/RT_\(BEGIN|END\)_DECLS/RT_C_DECLS_\1/g

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.2 KB
Line 
1/** @file
2 * SSM - The Save State Manager.
3 */
4
5/*
6 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#ifndef ___VBox_ssm_h
31#define ___VBox_ssm_h
32
33#include <VBox/cdefs.h>
34#include <VBox/types.h>
35#include <VBox/tm.h>
36#include <VBox/vmapi.h>
37
38RT_C_DECLS_BEGIN
39
40/** @defgroup grp_ssm The Saved State Manager API
41 * @{
42 */
43
44/**
45 * Determine the major version of the SSM version. If the major SSM version of two snapshots is
46 * different, the snapshots are incompatible.
47 */
48#define SSM_VERSION_MAJOR(ver) ((ver) & 0xffff0000)
49
50/**
51 * Determine the minor version of the SSM version. If the major SSM version of two snapshots is
52 * the same, the code must handle incompatibilies between minor version changes (e.g. use dummy
53 * values for non-existent fields).
54 */
55#define SSM_VERSION_MINOR(ver) ((ver) & 0x0000ffff)
56
57/**
58 * Determine if the major version changed between two SSM versions.
59 */
60#define SSM_VERSION_MAJOR_CHANGED(ver1,ver2) (SSM_VERSION_MAJOR(ver1) != SSM_VERSION_MAJOR(ver2))
61
62
63#ifdef IN_RING3
64/** @defgroup grp_ssm_r3 The SSM Host Context Ring-3 API
65 * @{
66 */
67
68
69/**
70 * What to do after the save/load operation.
71 */
72typedef enum SSMAFTER
73{
74 /** Will resume the loaded state. */
75 SSMAFTER_RESUME = 1,
76 /** Will destroy the VM after saving. */
77 SSMAFTER_DESTROY,
78 /** Will continue execution after saving the VM. */
79 SSMAFTER_CONTINUE,
80 /** Will debug the saved state.
81 * This is used to drop some of the stricter consitentcy checks so it'll
82 * load fine in the debugger or animator. */
83 SSMAFTER_DEBUG_IT,
84 /** The file was opened using SSMR3Open() and we have no idea what the plan is. */
85 SSMAFTER_OPENED
86} SSMAFTER;
87
88
89/**
90 * A structure field description.
91 *
92 * @todo Add an type field here for recording what's a GCPtr, GCPhys or anything
93 * else that may change and is expected to continue to work.
94 * @todo Later we need to add load transformations to this structure. I think a
95 * callback with a number of default transformations in SIG_DEF style
96 * would be good enough. The callback would take a user context from a new
97 * SSMR3GetStruct parameter or something.
98 */
99typedef struct SSMFIELD
100{
101 /** Field offset into the structure. */
102 uint32_t off;
103 /** The size of the field. */
104 uint32_t cb;
105} SSMFIELD;
106/** Pointer to a structure field description. */
107typedef SSMFIELD *PSSMFIELD;
108/** Pointer to a const structure field description. */
109typedef const SSMFIELD *PCSSMFIELD;
110
111/** Emit a SSMFIELD array entry. */
112#define SSMFIELD_ENTRY(Type, Field) { RT_OFFSETOF(Type, Field), RT_SIZEOFMEMB(Type, Field) }
113/** Emit a SSMFIELD array entry for a RTGCPTR type. */
114#define SSMFIELD_ENTRY_GCPTR(Type, Field) SSMFIELD_ENTRY(Type, Field)
115/** Emit a SSMFIELD array entry for a RTGCPHYS type. */
116#define SSMFIELD_ENTRY_GCPHYS(Type, Field) SSMFIELD_ENTRY(Type, Field)
117/** Emit the terminating entry of a SSMFIELD array. */
118#define SSMFIELD_ENTRY_TERM() { UINT32_MAX, UINT32_MAX }
119
120
121
122/** The PDM Device callback variants.
123 * @{
124 */
125
126/**
127 * Prepare state save operation.
128 *
129 * @returns VBox status code.
130 * @param pDevIns Device instance of the device which registered the data unit.
131 * @param pSSM SSM operation handle.
132 */
133typedef DECLCALLBACK(int) FNSSMDEVSAVEPREP(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
134/** Pointer to a FNSSMDEVSAVEPREP() function. */
135typedef FNSSMDEVSAVEPREP *PFNSSMDEVSAVEPREP;
136
137/**
138 * Execute state save operation.
139 *
140 * @returns VBox status code.
141 * @param pDevIns Device instance of the device which registered the data unit.
142 * @param pSSM SSM operation handle.
143 */
144typedef DECLCALLBACK(int) FNSSMDEVSAVEEXEC(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
145/** Pointer to a FNSSMDEVSAVEEXEC() function. */
146typedef FNSSMDEVSAVEEXEC *PFNSSMDEVSAVEEXEC;
147
148/**
149 * Done state save operation.
150 *
151 * @returns VBox status code.
152 * @param pDevIns Device instance of the device which registered the data unit.
153 * @param pSSM SSM operation handle.
154 */
155typedef DECLCALLBACK(int) FNSSMDEVSAVEDONE(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
156/** Pointer to a FNSSMDEVSAVEDONE() function. */
157typedef FNSSMDEVSAVEDONE *PFNSSMDEVSAVEDONE;
158
159/**
160 * Prepare state load operation.
161 *
162 * @returns VBox status code.
163 * @param pDevIns Device instance of the device which registered the data unit.
164 * @param pSSM SSM operation handle.
165 */
166typedef DECLCALLBACK(int) FNSSMDEVLOADPREP(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
167/** Pointer to a FNSSMDEVLOADPREP() function. */
168typedef FNSSMDEVLOADPREP *PFNSSMDEVLOADPREP;
169
170/**
171 * Execute state load operation.
172 *
173 * @returns VBox status code.
174 * @param pDevIns Device instance of the device which registered the data unit.
175 * @param pSSM SSM operation handle.
176 * @param u32Version Data layout version.
177 */
178typedef DECLCALLBACK(int) FNSSMDEVLOADEXEC(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u32Version);
179/** Pointer to a FNSSMDEVLOADEXEC() function. */
180typedef FNSSMDEVLOADEXEC *PFNSSMDEVLOADEXEC;
181
182/**
183 * Done state load operation.
184 *
185 * @returns VBox load code.
186 * @param pDevIns Device instance of the device which registered the data unit.
187 * @param pSSM SSM operation handle.
188 */
189typedef DECLCALLBACK(int) FNSSMDEVLOADDONE(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
190/** Pointer to a FNSSMDEVLOADDONE() function. */
191typedef FNSSMDEVLOADDONE *PFNSSMDEVLOADDONE;
192
193/** @} */
194
195
196/** The PDM Driver callback variants.
197 * @{
198 */
199
200/**
201 * Prepare state save operation.
202 *
203 * @returns VBox status code.
204 * @param pDrvIns Driver instance of the driver which registered the data unit.
205 * @param pSSM SSM operation handle.
206 */
207typedef DECLCALLBACK(int) FNSSMDRVSAVEPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
208/** Pointer to a FNSSMDRVSAVEPREP() function. */
209typedef FNSSMDRVSAVEPREP *PFNSSMDRVSAVEPREP;
210
211/**
212 * Execute state save operation.
213 *
214 * @returns VBox status code.
215 * @param pDrvIns Driver instance of the driver which registered the data unit.
216 * @param pSSM SSM operation handle.
217 */
218typedef DECLCALLBACK(int) FNSSMDRVSAVEEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
219/** Pointer to a FNSSMDRVSAVEEXEC() function. */
220typedef FNSSMDRVSAVEEXEC *PFNSSMDRVSAVEEXEC;
221
222/**
223 * Done state save operation.
224 *
225 * @returns VBox status code.
226 * @param pDrvIns Driver instance of the driver which registered the data unit.
227 * @param pSSM SSM operation handle.
228 */
229typedef DECLCALLBACK(int) FNSSMDRVSAVEDONE(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
230/** Pointer to a FNSSMDRVSAVEDONE() function. */
231typedef FNSSMDRVSAVEDONE *PFNSSMDRVSAVEDONE;
232
233/**
234 * Prepare state load operation.
235 *
236 * @returns VBox status code.
237 * @param pDrvIns Driver instance of the driver which registered the data unit.
238 * @param pSSM SSM operation handle.
239 */
240typedef DECLCALLBACK(int) FNSSMDRVLOADPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
241/** Pointer to a FNSSMDRVLOADPREP() function. */
242typedef FNSSMDRVLOADPREP *PFNSSMDRVLOADPREP;
243
244/**
245 * Execute state load operation.
246 *
247 * @returns VBox status code.
248 * @param pDrvIns Driver instance of the driver which registered the data unit.
249 * @param pSSM SSM operation handle.
250 * @param u32Version Data layout version.
251 */
252typedef DECLCALLBACK(int) FNSSMDRVLOADEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t u32Version);
253/** Pointer to a FNSSMDRVLOADEXEC() function. */
254typedef FNSSMDRVLOADEXEC *PFNSSMDRVLOADEXEC;
255
256/**
257 * Done state load operation.
258 *
259 * @returns VBox load code.
260 * @param pDrvIns Driver instance of the driver which registered the data unit.
261 * @param pSSM SSM operation handle.
262 */
263typedef DECLCALLBACK(int) FNSSMDRVLOADDONE(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
264/** Pointer to a FNSSMDRVLOADDONE() function. */
265typedef FNSSMDRVLOADDONE *PFNSSMDRVLOADDONE;
266
267/** @} */
268
269
270/** The internal callback variants.
271 * @{
272 */
273
274/**
275 * Prepare state save operation.
276 *
277 * @returns VBox status code.
278 * @param pVM VM Handle.
279 * @param pSSM SSM operation handle.
280 */
281typedef DECLCALLBACK(int) FNSSMINTSAVEPREP(PVM pVM, PSSMHANDLE pSSM);
282/** Pointer to a FNSSMINTSAVEPREP() function. */
283typedef FNSSMINTSAVEPREP *PFNSSMINTSAVEPREP;
284
285/**
286 * Execute state save operation.
287 *
288 * @returns VBox status code.
289 * @param pVM VM Handle.
290 * @param pSSM SSM operation handle.
291 */
292typedef DECLCALLBACK(int) FNSSMINTSAVEEXEC(PVM pVM, PSSMHANDLE pSSM);
293/** Pointer to a FNSSMINTSAVEEXEC() function. */
294typedef FNSSMINTSAVEEXEC *PFNSSMINTSAVEEXEC;
295
296/**
297 * Done state save operation.
298 *
299 * @returns VBox status code.
300 * @param pVM VM Handle.
301 * @param pSSM SSM operation handle.
302 */
303typedef DECLCALLBACK(int) FNSSMINTSAVEDONE(PVM pVM, PSSMHANDLE pSSM);
304/** Pointer to a FNSSMINTSAVEDONE() function. */
305typedef FNSSMINTSAVEDONE *PFNSSMINTSAVEDONE;
306
307/**
308 * Prepare state load operation.
309 *
310 * @returns VBox status code.
311 * @param pVM VM Handle.
312 * @param pSSM SSM operation handle.
313 */
314typedef DECLCALLBACK(int) FNSSMINTLOADPREP(PVM pVM, PSSMHANDLE pSSM);
315/** Pointer to a FNSSMINTLOADPREP() function. */
316typedef FNSSMINTLOADPREP *PFNSSMINTLOADPREP;
317
318/**
319 * Execute state load operation.
320 *
321 * @returns VBox status code.
322 * @param pVM VM Handle.
323 * @param pSSM SSM operation handle.
324 * @param u32Version Data layout version.
325 */
326typedef DECLCALLBACK(int) FNSSMINTLOADEXEC(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version);
327/** Pointer to a FNSSMINTLOADEXEC() function. */
328typedef FNSSMINTLOADEXEC *PFNSSMINTLOADEXEC;
329
330/**
331 * Done state load operation.
332 *
333 * @returns VBox load code.
334 * @param pVM VM Handle.
335 * @param pSSM SSM operation handle.
336 */
337typedef DECLCALLBACK(int) FNSSMINTLOADDONE(PVM pVM, PSSMHANDLE pSSM);
338/** Pointer to a FNSSMINTLOADDONE() function. */
339typedef FNSSMINTLOADDONE *PFNSSMINTLOADDONE;
340
341/** @} */
342
343
344/** The External callback variants.
345 * @{
346 */
347
348/**
349 * Prepare state save operation.
350 *
351 * @returns VBox status code.
352 * @param pSSM SSM operation handle.
353 * @param pvUser User argument.
354 */
355typedef DECLCALLBACK(int) FNSSMEXTSAVEPREP(PSSMHANDLE pSSM, void *pvUser);
356/** Pointer to a FNSSMEXTSAVEPREP() function. */
357typedef FNSSMEXTSAVEPREP *PFNSSMEXTSAVEPREP;
358
359/**
360 * Execute state save operation.
361 *
362 * @param pSSM SSM operation handle.
363 * @param pvUser User argument.
364 * @author The lack of return code is for legacy reasons.
365 */
366typedef DECLCALLBACK(void) FNSSMEXTSAVEEXEC(PSSMHANDLE pSSM, void *pvUser);
367/** Pointer to a FNSSMEXTSAVEEXEC() function. */
368typedef FNSSMEXTSAVEEXEC *PFNSSMEXTSAVEEXEC;
369
370/**
371 * Done state save operation.
372 *
373 * @returns VBox status code.
374 * @param pSSM SSM operation handle.
375 * @param pvUser User argument.
376 */
377typedef DECLCALLBACK(int) FNSSMEXTSAVEDONE(PSSMHANDLE pSSM, void *pvUser);
378/** Pointer to a FNSSMEXTSAVEDONE() function. */
379typedef FNSSMEXTSAVEDONE *PFNSSMEXTSAVEDONE;
380
381/**
382 * Prepare state load operation.
383 *
384 * @returns VBox status code.
385 * @param pSSM SSM operation handle.
386 * @param pvUser User argument.
387 */
388typedef DECLCALLBACK(int) FNSSMEXTLOADPREP(PSSMHANDLE pSSM, void *pvUser);
389/** Pointer to a FNSSMEXTLOADPREP() function. */
390typedef FNSSMEXTLOADPREP *PFNSSMEXTLOADPREP;
391
392/**
393 * Execute state load operation.
394 *
395 * @returns 0 on success.
396 * @returns Not 0 on failure.
397 * @param pSSM SSM operation handle.
398 * @param pvUser User argument.
399 * @param u32Version Data layout version.
400 * @remark The odd return value is for legacy reasons.
401 */
402typedef DECLCALLBACK(int) FNSSMEXTLOADEXEC(PSSMHANDLE pSSM, void *pvUser, uint32_t u32Version);
403/** Pointer to a FNSSMEXTLOADEXEC() function. */
404typedef FNSSMEXTLOADEXEC *PFNSSMEXTLOADEXEC;
405
406/**
407 * Done state load operation.
408 *
409 * @returns VBox load code.
410 * @param pSSM SSM operation handle.
411 * @param pvUser User argument.
412 */
413typedef DECLCALLBACK(int) FNSSMEXTLOADDONE(PSSMHANDLE pSSM, void *pvUser);
414/** Pointer to a FNSSMEXTLOADDONE() function. */
415typedef FNSSMEXTLOADDONE *PFNSSMEXTLOADDONE;
416
417/** @} */
418
419
420VMMR3DECL(int) SSMR3RegisterDevice(PVM pVM, PPDMDEVINS pDevIns, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess, const char *pszBefore,
421 PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
422 PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone);
423VMMR3DECL(int) SSMR3RegisterDriver(PVM pVM, PPDMDRVINS pDrvIns, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
424 PFNSSMDRVSAVEPREP pfnSavePrep, PFNSSMDRVSAVEEXEC pfnSaveExec, PFNSSMDRVSAVEDONE pfnSaveDone,
425 PFNSSMDRVLOADPREP pfnLoadPrep, PFNSSMDRVLOADEXEC pfnLoadExec, PFNSSMDRVLOADDONE pfnLoadDone);
426VMMR3DECL(int) SSMR3RegisterInternal(PVM pVM, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
427 PFNSSMINTSAVEPREP pfnSavePrep, PFNSSMINTSAVEEXEC pfnSaveExec, PFNSSMINTSAVEDONE pfnSaveDone,
428 PFNSSMINTLOADPREP pfnLoadPrep, PFNSSMINTLOADEXEC pfnLoadExec, PFNSSMINTLOADDONE pfnLoadDone);
429VMMR3DECL(int) SSMR3RegisterExternal(PVM pVM, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
430 PFNSSMEXTSAVEPREP pfnSavePrep, PFNSSMEXTSAVEEXEC pfnSaveExec, PFNSSMEXTSAVEDONE pfnSaveDone,
431 PFNSSMEXTLOADPREP pfnLoadPrep, PFNSSMEXTLOADEXEC pfnLoadExec, PFNSSMEXTLOADDONE pfnLoadDone, void *pvUser);
432VMMR3DECL(int) SSMR3DeregisterDevice(PVM pVM, PPDMDEVINS pDevIns, const char *pszName, uint32_t u32Instance);
433VMMR3DECL(int) SSMR3DeregisterDriver(PVM pVM, PPDMDRVINS pDrvIns, const char *pszName, uint32_t u32Instance);
434VMMR3DECL(int) SSMR3DeregisterInternal(PVM pVM, const char *pszName);
435VMMR3DECL(int) SSMR3DeregisterExternal(PVM pVM, const char *pszName);
436VMMR3DECL(int) SSMR3Save(PVM pVM, const char *pszFilename, SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvUser);
437VMMR3DECL(int) SSMR3Load(PVM pVM, const char *pszFilename, SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvUser);
438VMMR3DECL(int) SSMR3ValidateFile(const char *pszFilename);
439VMMR3DECL(int) SSMR3Open(const char *pszFilename, unsigned fFlags, PSSMHANDLE *ppSSM);
440VMMR3DECL(int) SSMR3Close(PSSMHANDLE pSSM);
441VMMR3DECL(int) SSMR3Seek(PSSMHANDLE pSSM, const char *pszUnit, uint32_t iInstance, uint32_t *piVersion);
442VMMR3DECL(int) SSMR3HandleGetStatus(PSSMHANDLE pSSM);
443VMMR3DECL(int) SSMR3HandleSetStatus(PSSMHANDLE pSSM, int iStatus);
444VMMR3DECL(SSMAFTER) SSMR3HandleGetAfter(PSSMHANDLE pSSM);
445VMMR3DECL(uint64_t) SSMR3HandleGetUnitOffset(PSSMHANDLE pSSM);
446VMMR3DECL(int) SSMR3SetGCPtrSize(PSSMHANDLE pSSM, unsigned cbGCPtr);
447
448
449/** Save operations.
450 * @{
451 */
452VMMR3DECL(int) SSMR3PutStruct(PSSMHANDLE pSSM, const void *pvStruct, PCSSMFIELD paFields);
453VMMR3DECL(int) SSMR3PutBool(PSSMHANDLE pSSM, bool fBool);
454VMMR3DECL(int) SSMR3PutU8(PSSMHANDLE pSSM, uint8_t u8);
455VMMR3DECL(int) SSMR3PutS8(PSSMHANDLE pSSM, int8_t i8);
456VMMR3DECL(int) SSMR3PutU16(PSSMHANDLE pSSM, uint16_t u16);
457VMMR3DECL(int) SSMR3PutS16(PSSMHANDLE pSSM, int16_t i16);
458VMMR3DECL(int) SSMR3PutU32(PSSMHANDLE pSSM, uint32_t u32);
459VMMR3DECL(int) SSMR3PutS32(PSSMHANDLE pSSM, int32_t i32);
460VMMR3DECL(int) SSMR3PutU64(PSSMHANDLE pSSM, uint64_t u64);
461VMMR3DECL(int) SSMR3PutS64(PSSMHANDLE pSSM, int64_t i64);
462VMMR3DECL(int) SSMR3PutU128(PSSMHANDLE pSSM, uint128_t u128);
463VMMR3DECL(int) SSMR3PutS128(PSSMHANDLE pSSM, int128_t i128);
464VMMR3DECL(int) SSMR3PutUInt(PSSMHANDLE pSSM, RTUINT u);
465VMMR3DECL(int) SSMR3PutSInt(PSSMHANDLE pSSM, RTINT i);
466VMMR3DECL(int) SSMR3PutGCUInt(PSSMHANDLE pSSM, RTGCUINT u);
467VMMR3DECL(int) SSMR3PutGCUIntReg(PSSMHANDLE pSSM, RTGCUINTREG u);
468VMMR3DECL(int) SSMR3PutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys);
469VMMR3DECL(int) SSMR3PutGCPhys64(PSSMHANDLE pSSM, RTGCPHYS64 GCPhys);
470VMMR3DECL(int) SSMR3PutGCPhys(PSSMHANDLE pSSM, RTGCPHYS GCPhys);
471VMMR3DECL(int) SSMR3PutGCPtr(PSSMHANDLE pSSM, RTGCPTR GCPtr);
472VMMR3DECL(int) SSMR3PutGCUIntPtr(PSSMHANDLE pSSM, RTGCUINTPTR GCPtr);
473VMMR3DECL(int) SSMR3PutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr);
474VMMR3DECL(int) SSMR3PutIOPort(PSSMHANDLE pSSM, RTIOPORT IOPort);
475VMMR3DECL(int) SSMR3PutSel(PSSMHANDLE pSSM, RTSEL Sel);
476VMMR3DECL(int) SSMR3PutMem(PSSMHANDLE pSSM, const void *pv, size_t cb);
477VMMR3DECL(int) SSMR3PutStrZ(PSSMHANDLE pSSM, const char *psz);
478/** @} */
479
480
481
482/** Load operations.
483 * @{
484 */
485VMMR3DECL(int) SSMR3GetStruct(PSSMHANDLE pSSM, void *pvStruct, PCSSMFIELD paFields);
486VMMR3DECL(int) SSMR3GetBool(PSSMHANDLE pSSM, bool *pfBool);
487VMMR3DECL(int) SSMR3GetU8(PSSMHANDLE pSSM, uint8_t *pu8);
488VMMR3DECL(int) SSMR3GetS8(PSSMHANDLE pSSM, int8_t *pi8);
489VMMR3DECL(int) SSMR3GetU16(PSSMHANDLE pSSM, uint16_t *pu16);
490VMMR3DECL(int) SSMR3GetS16(PSSMHANDLE pSSM, int16_t *pi16);
491VMMR3DECL(int) SSMR3GetU32(PSSMHANDLE pSSM, uint32_t *pu32);
492VMMR3DECL(int) SSMR3GetS32(PSSMHANDLE pSSM, int32_t *pi32);
493VMMR3DECL(int) SSMR3GetU64(PSSMHANDLE pSSM, uint64_t *pu64);
494VMMR3DECL(int) SSMR3GetS64(PSSMHANDLE pSSM, int64_t *pi64);
495VMMR3DECL(int) SSMR3GetU128(PSSMHANDLE pSSM, uint128_t *pu128);
496VMMR3DECL(int) SSMR3GetS128(PSSMHANDLE pSSM, int128_t *pi128);
497VMMR3DECL(int) SSMR3GetUInt(PSSMHANDLE pSSM, PRTUINT pu);
498VMMR3DECL(int) SSMR3GetSInt(PSSMHANDLE pSSM, PRTINT pi);
499VMMR3DECL(int) SSMR3GetGCUInt(PSSMHANDLE pSSM, PRTGCUINT pu);
500VMMR3DECL(int) SSMR3GetGCUIntReg(PSSMHANDLE pSSM, PRTGCUINTREG pu);
501VMMR3DECL(int) SSMR3GetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys);
502VMMR3DECL(int) SSMR3GetGCPhys64(PSSMHANDLE pSSM, PRTGCPHYS64 pGCPhys);
503VMMR3DECL(int) SSMR3GetGCPhys(PSSMHANDLE pSSM, PRTGCPHYS pGCPhys);
504VMMR3DECL(int) SSMR3GetGCPtr(PSSMHANDLE pSSM, PRTGCPTR pGCPtr);
505VMMR3DECL(int) SSMR3GetGCUIntPtr(PSSMHANDLE pSSM, PRTGCUINTPTR pGCPtr);
506VMMR3DECL(int) SSMR3GetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr);
507VMMR3DECL(int) SSMR3GetIOPort(PSSMHANDLE pSSM, PRTIOPORT pIOPort);
508VMMR3DECL(int) SSMR3GetSel(PSSMHANDLE pSSM, PRTSEL pSel);
509VMMR3DECL(int) SSMR3GetMem(PSSMHANDLE pSSM, void *pv, size_t cb);
510VMMR3DECL(int) SSMR3GetStrZ(PSSMHANDLE pSSM, char *psz, size_t cbMax);
511VMMR3DECL(int) SSMR3GetStrZEx(PSSMHANDLE pSSM, char *psz, size_t cbMax, size_t *pcbStr);
512VMMR3DECL(int) SSMR3GetTimer(PSSMHANDLE pSSM, PTMTIMER pTimer);
513VMMR3DECL(int) SSMR3Skip(PSSMHANDLE pSSM, size_t cb);
514
515/** @} */
516
517/** @} */
518#endif /* IN_RING3 */
519
520
521/** @} */
522
523RT_C_DECLS_END
524
525#endif
526
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