VirtualBox

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

Last change on this file since 22430 was 21927, checked in by vboxsync, 16 years ago

SSM,VBox/err.h: SSMR3SkipToEndOfUnit and more error codes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.3 KB
Line 
1/** @file
2 * SSM - The Save State Manager. (VMM)
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 /** Invalid. */
75 SSMAFTER_INVALID = 0,
76 /** Will resume the loaded state. */
77 SSMAFTER_RESUME,
78 /** Will destroy the VM after saving. */
79 SSMAFTER_DESTROY,
80 /** Will continue execution after saving the VM. */
81 SSMAFTER_CONTINUE,
82 /** Will debug the saved state.
83 * This is used to drop some of the stricter consitentcy checks so it'll
84 * load fine in the debugger or animator. */
85 SSMAFTER_DEBUG_IT,
86 /** The file was opened using SSMR3Open() and we have no idea what the plan is. */
87 SSMAFTER_OPENED
88} SSMAFTER;
89
90
91/**
92 * A structure field description.
93 *
94 * @todo Add an type field here for recording what's a GCPtr, GCPhys or anything
95 * else that may change and is expected to continue to work.
96 * @todo Later we need to add load transformations to this structure. I think a
97 * callback with a number of default transformations in SIG_DEF style
98 * would be good enough. The callback would take a user context from a new
99 * SSMR3GetStruct parameter or something.
100 */
101typedef struct SSMFIELD
102{
103 /** Field offset into the structure. */
104 uint32_t off;
105 /** The size of the field. */
106 uint32_t cb;
107} SSMFIELD;
108/** Pointer to a structure field description. */
109typedef SSMFIELD *PSSMFIELD;
110/** Pointer to a const structure field description. */
111typedef const SSMFIELD *PCSSMFIELD;
112
113/** Emit a SSMFIELD array entry. */
114#define SSMFIELD_ENTRY(Type, Field) { RT_OFFSETOF(Type, Field), RT_SIZEOFMEMB(Type, Field) }
115/** Emit a SSMFIELD array entry for a RTGCPTR type. */
116#define SSMFIELD_ENTRY_GCPTR(Type, Field) SSMFIELD_ENTRY(Type, Field)
117/** Emit a SSMFIELD array entry for a RTGCPHYS type. */
118#define SSMFIELD_ENTRY_GCPHYS(Type, Field) SSMFIELD_ENTRY(Type, Field)
119/** Emit the terminating entry of a SSMFIELD array. */
120#define SSMFIELD_ENTRY_TERM() { UINT32_MAX, UINT32_MAX }
121
122
123
124/** The PDM Device callback variants.
125 * @{
126 */
127
128/**
129 * Prepare state save operation.
130 *
131 * @returns VBox status code.
132 * @param pDevIns Device instance of the device which registered the data unit.
133 * @param pSSM SSM operation handle.
134 */
135typedef DECLCALLBACK(int) FNSSMDEVSAVEPREP(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
136/** Pointer to a FNSSMDEVSAVEPREP() function. */
137typedef FNSSMDEVSAVEPREP *PFNSSMDEVSAVEPREP;
138
139/**
140 * Execute state save operation.
141 *
142 * @returns VBox status code.
143 * @param pDevIns Device instance of the device which registered the data unit.
144 * @param pSSM SSM operation handle.
145 */
146typedef DECLCALLBACK(int) FNSSMDEVSAVEEXEC(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
147/** Pointer to a FNSSMDEVSAVEEXEC() function. */
148typedef FNSSMDEVSAVEEXEC *PFNSSMDEVSAVEEXEC;
149
150/**
151 * Done state save operation.
152 *
153 * @returns VBox status code.
154 * @param pDevIns Device instance of the device which registered the data unit.
155 * @param pSSM SSM operation handle.
156 */
157typedef DECLCALLBACK(int) FNSSMDEVSAVEDONE(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
158/** Pointer to a FNSSMDEVSAVEDONE() function. */
159typedef FNSSMDEVSAVEDONE *PFNSSMDEVSAVEDONE;
160
161/**
162 * Prepare state load operation.
163 *
164 * @returns VBox status code.
165 * @param pDevIns Device instance of the device which registered the data unit.
166 * @param pSSM SSM operation handle.
167 */
168typedef DECLCALLBACK(int) FNSSMDEVLOADPREP(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
169/** Pointer to a FNSSMDEVLOADPREP() function. */
170typedef FNSSMDEVLOADPREP *PFNSSMDEVLOADPREP;
171
172/**
173 * Execute state load operation.
174 *
175 * @returns VBox status code.
176 * @param pDevIns Device instance of the device which registered the data unit.
177 * @param pSSM SSM operation handle.
178 * @param u32Version Data layout version.
179 */
180typedef DECLCALLBACK(int) FNSSMDEVLOADEXEC(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t u32Version);
181/** Pointer to a FNSSMDEVLOADEXEC() function. */
182typedef FNSSMDEVLOADEXEC *PFNSSMDEVLOADEXEC;
183
184/**
185 * Done state load operation.
186 *
187 * @returns VBox load code.
188 * @param pDevIns Device instance of the device which registered the data unit.
189 * @param pSSM SSM operation handle.
190 */
191typedef DECLCALLBACK(int) FNSSMDEVLOADDONE(PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
192/** Pointer to a FNSSMDEVLOADDONE() function. */
193typedef FNSSMDEVLOADDONE *PFNSSMDEVLOADDONE;
194
195/** @} */
196
197
198/** The PDM Driver callback variants.
199 * @{
200 */
201
202/**
203 * Prepare state save operation.
204 *
205 * @returns VBox status code.
206 * @param pDrvIns Driver instance of the driver which registered the data unit.
207 * @param pSSM SSM operation handle.
208 */
209typedef DECLCALLBACK(int) FNSSMDRVSAVEPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
210/** Pointer to a FNSSMDRVSAVEPREP() function. */
211typedef FNSSMDRVSAVEPREP *PFNSSMDRVSAVEPREP;
212
213/**
214 * Execute state save operation.
215 *
216 * @returns VBox status code.
217 * @param pDrvIns Driver instance of the driver which registered the data unit.
218 * @param pSSM SSM operation handle.
219 */
220typedef DECLCALLBACK(int) FNSSMDRVSAVEEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
221/** Pointer to a FNSSMDRVSAVEEXEC() function. */
222typedef FNSSMDRVSAVEEXEC *PFNSSMDRVSAVEEXEC;
223
224/**
225 * Done state save operation.
226 *
227 * @returns VBox status code.
228 * @param pDrvIns Driver instance of the driver which registered the data unit.
229 * @param pSSM SSM operation handle.
230 */
231typedef DECLCALLBACK(int) FNSSMDRVSAVEDONE(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
232/** Pointer to a FNSSMDRVSAVEDONE() function. */
233typedef FNSSMDRVSAVEDONE *PFNSSMDRVSAVEDONE;
234
235/**
236 * Prepare state load operation.
237 *
238 * @returns VBox status code.
239 * @param pDrvIns Driver instance of the driver which registered the data unit.
240 * @param pSSM SSM operation handle.
241 */
242typedef DECLCALLBACK(int) FNSSMDRVLOADPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
243/** Pointer to a FNSSMDRVLOADPREP() function. */
244typedef FNSSMDRVLOADPREP *PFNSSMDRVLOADPREP;
245
246/**
247 * Execute state load operation.
248 *
249 * @returns VBox status code.
250 * @param pDrvIns Driver instance of the driver which registered the data unit.
251 * @param pSSM SSM operation handle.
252 * @param u32Version Data layout version.
253 */
254typedef DECLCALLBACK(int) FNSSMDRVLOADEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t u32Version);
255/** Pointer to a FNSSMDRVLOADEXEC() function. */
256typedef FNSSMDRVLOADEXEC *PFNSSMDRVLOADEXEC;
257
258/**
259 * Done state load operation.
260 *
261 * @returns VBox load code.
262 * @param pDrvIns Driver instance of the driver which registered the data unit.
263 * @param pSSM SSM operation handle.
264 */
265typedef DECLCALLBACK(int) FNSSMDRVLOADDONE(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
266/** Pointer to a FNSSMDRVLOADDONE() function. */
267typedef FNSSMDRVLOADDONE *PFNSSMDRVLOADDONE;
268
269/** @} */
270
271
272/** The internal callback variants.
273 * @{
274 */
275
276/**
277 * Prepare state save operation.
278 *
279 * @returns VBox status code.
280 * @param pVM VM Handle.
281 * @param pSSM SSM operation handle.
282 */
283typedef DECLCALLBACK(int) FNSSMINTSAVEPREP(PVM pVM, PSSMHANDLE pSSM);
284/** Pointer to a FNSSMINTSAVEPREP() function. */
285typedef FNSSMINTSAVEPREP *PFNSSMINTSAVEPREP;
286
287/**
288 * Execute state save operation.
289 *
290 * @returns VBox status code.
291 * @param pVM VM Handle.
292 * @param pSSM SSM operation handle.
293 */
294typedef DECLCALLBACK(int) FNSSMINTSAVEEXEC(PVM pVM, PSSMHANDLE pSSM);
295/** Pointer to a FNSSMINTSAVEEXEC() function. */
296typedef FNSSMINTSAVEEXEC *PFNSSMINTSAVEEXEC;
297
298/**
299 * Done state save operation.
300 *
301 * @returns VBox status code.
302 * @param pVM VM Handle.
303 * @param pSSM SSM operation handle.
304 */
305typedef DECLCALLBACK(int) FNSSMINTSAVEDONE(PVM pVM, PSSMHANDLE pSSM);
306/** Pointer to a FNSSMINTSAVEDONE() function. */
307typedef FNSSMINTSAVEDONE *PFNSSMINTSAVEDONE;
308
309/**
310 * Prepare state load operation.
311 *
312 * @returns VBox status code.
313 * @param pVM VM Handle.
314 * @param pSSM SSM operation handle.
315 */
316typedef DECLCALLBACK(int) FNSSMINTLOADPREP(PVM pVM, PSSMHANDLE pSSM);
317/** Pointer to a FNSSMINTLOADPREP() function. */
318typedef FNSSMINTLOADPREP *PFNSSMINTLOADPREP;
319
320/**
321 * Execute state load operation.
322 *
323 * @returns VBox status code.
324 * @param pVM VM Handle.
325 * @param pSSM SSM operation handle.
326 * @param u32Version Data layout version.
327 */
328typedef DECLCALLBACK(int) FNSSMINTLOADEXEC(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version);
329/** Pointer to a FNSSMINTLOADEXEC() function. */
330typedef FNSSMINTLOADEXEC *PFNSSMINTLOADEXEC;
331
332/**
333 * Done state load operation.
334 *
335 * @returns VBox load code.
336 * @param pVM VM Handle.
337 * @param pSSM SSM operation handle.
338 */
339typedef DECLCALLBACK(int) FNSSMINTLOADDONE(PVM pVM, PSSMHANDLE pSSM);
340/** Pointer to a FNSSMINTLOADDONE() function. */
341typedef FNSSMINTLOADDONE *PFNSSMINTLOADDONE;
342
343/** @} */
344
345
346/** The External callback variants.
347 * @{
348 */
349
350/**
351 * Prepare state save operation.
352 *
353 * @returns VBox status code.
354 * @param pSSM SSM operation handle.
355 * @param pvUser User argument.
356 */
357typedef DECLCALLBACK(int) FNSSMEXTSAVEPREP(PSSMHANDLE pSSM, void *pvUser);
358/** Pointer to a FNSSMEXTSAVEPREP() function. */
359typedef FNSSMEXTSAVEPREP *PFNSSMEXTSAVEPREP;
360
361/**
362 * Execute state save operation.
363 *
364 * @param pSSM SSM operation handle.
365 * @param pvUser User argument.
366 * @author The lack of return code is for legacy reasons.
367 */
368typedef DECLCALLBACK(void) FNSSMEXTSAVEEXEC(PSSMHANDLE pSSM, void *pvUser);
369/** Pointer to a FNSSMEXTSAVEEXEC() function. */
370typedef FNSSMEXTSAVEEXEC *PFNSSMEXTSAVEEXEC;
371
372/**
373 * Done state save operation.
374 *
375 * @returns VBox status code.
376 * @param pSSM SSM operation handle.
377 * @param pvUser User argument.
378 */
379typedef DECLCALLBACK(int) FNSSMEXTSAVEDONE(PSSMHANDLE pSSM, void *pvUser);
380/** Pointer to a FNSSMEXTSAVEDONE() function. */
381typedef FNSSMEXTSAVEDONE *PFNSSMEXTSAVEDONE;
382
383/**
384 * Prepare state load operation.
385 *
386 * @returns VBox status code.
387 * @param pSSM SSM operation handle.
388 * @param pvUser User argument.
389 */
390typedef DECLCALLBACK(int) FNSSMEXTLOADPREP(PSSMHANDLE pSSM, void *pvUser);
391/** Pointer to a FNSSMEXTLOADPREP() function. */
392typedef FNSSMEXTLOADPREP *PFNSSMEXTLOADPREP;
393
394/**
395 * Execute state load operation.
396 *
397 * @returns VBox status code.
398 * @param pSSM SSM operation handle.
399 * @param pvUser User argument.
400 * @param u32Version Data layout version.
401 * @remark The odd return value is for legacy reasons.
402 */
403typedef DECLCALLBACK(int) FNSSMEXTLOADEXEC(PSSMHANDLE pSSM, void *pvUser, uint32_t u32Version);
404/** Pointer to a FNSSMEXTLOADEXEC() function. */
405typedef FNSSMEXTLOADEXEC *PFNSSMEXTLOADEXEC;
406
407/**
408 * Done state load operation.
409 *
410 * @returns VBox load code.
411 * @param pSSM SSM operation handle.
412 * @param pvUser User argument.
413 */
414typedef DECLCALLBACK(int) FNSSMEXTLOADDONE(PSSMHANDLE pSSM, void *pvUser);
415/** Pointer to a FNSSMEXTLOADDONE() function. */
416typedef FNSSMEXTLOADDONE *PFNSSMEXTLOADDONE;
417
418/** @} */
419
420
421VMMR3DECL(int) SSMR3RegisterDevice(PVM pVM, PPDMDEVINS pDevIns, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess, const char *pszBefore,
422 PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
423 PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone);
424VMMR3DECL(int) SSMR3RegisterDriver(PVM pVM, PPDMDRVINS pDrvIns, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
425 PFNSSMDRVSAVEPREP pfnSavePrep, PFNSSMDRVSAVEEXEC pfnSaveExec, PFNSSMDRVSAVEDONE pfnSaveDone,
426 PFNSSMDRVLOADPREP pfnLoadPrep, PFNSSMDRVLOADEXEC pfnLoadExec, PFNSSMDRVLOADDONE pfnLoadDone);
427VMMR3DECL(int) SSMR3RegisterInternal(PVM pVM, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
428 PFNSSMINTSAVEPREP pfnSavePrep, PFNSSMINTSAVEEXEC pfnSaveExec, PFNSSMINTSAVEDONE pfnSaveDone,
429 PFNSSMINTLOADPREP pfnLoadPrep, PFNSSMINTLOADEXEC pfnLoadExec, PFNSSMINTLOADDONE pfnLoadDone);
430VMMR3DECL(int) SSMR3RegisterExternal(PVM pVM, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
431 PFNSSMEXTSAVEPREP pfnSavePrep, PFNSSMEXTSAVEEXEC pfnSaveExec, PFNSSMEXTSAVEDONE pfnSaveDone,
432 PFNSSMEXTLOADPREP pfnLoadPrep, PFNSSMEXTLOADEXEC pfnLoadExec, PFNSSMEXTLOADDONE pfnLoadDone, void *pvUser);
433VMMR3DECL(int) SSMR3DeregisterDevice(PVM pVM, PPDMDEVINS pDevIns, const char *pszName, uint32_t u32Instance);
434VMMR3DECL(int) SSMR3DeregisterDriver(PVM pVM, PPDMDRVINS pDrvIns, const char *pszName, uint32_t u32Instance);
435VMMR3DECL(int) SSMR3DeregisterInternal(PVM pVM, const char *pszName);
436VMMR3DECL(int) SSMR3DeregisterExternal(PVM pVM, const char *pszName);
437VMMR3DECL(int) SSMR3Save(PVM pVM, const char *pszFilename, SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvUser);
438VMMR3DECL(int) SSMR3Load(PVM pVM, const char *pszFilename, SSMAFTER enmAfter, PFNVMPROGRESS pfnProgress, void *pvUser);
439VMMR3DECL(int) SSMR3ValidateFile(const char *pszFilename, bool fChecksumIt);
440VMMR3DECL(int) SSMR3Open(const char *pszFilename, unsigned fFlags, PSSMHANDLE *ppSSM);
441VMMR3DECL(int) SSMR3Close(PSSMHANDLE pSSM);
442VMMR3DECL(int) SSMR3Seek(PSSMHANDLE pSSM, const char *pszUnit, uint32_t iInstance, uint32_t *piVersion);
443VMMR3DECL(int) SSMR3HandleGetStatus(PSSMHANDLE pSSM);
444VMMR3DECL(int) SSMR3HandleSetStatus(PSSMHANDLE pSSM, int iStatus);
445VMMR3DECL(SSMAFTER) SSMR3HandleGetAfter(PSSMHANDLE pSSM);
446VMMR3DECL(uint64_t) SSMR3HandleGetUnitOffset(PSSMHANDLE pSSM);
447VMMR3DECL(int) SSMR3SetGCPtrSize(PSSMHANDLE pSSM, unsigned cbGCPtr);
448
449
450/** Save operations.
451 * @{
452 */
453VMMR3DECL(int) SSMR3PutStruct(PSSMHANDLE pSSM, const void *pvStruct, PCSSMFIELD paFields);
454VMMR3DECL(int) SSMR3PutBool(PSSMHANDLE pSSM, bool fBool);
455VMMR3DECL(int) SSMR3PutU8(PSSMHANDLE pSSM, uint8_t u8);
456VMMR3DECL(int) SSMR3PutS8(PSSMHANDLE pSSM, int8_t i8);
457VMMR3DECL(int) SSMR3PutU16(PSSMHANDLE pSSM, uint16_t u16);
458VMMR3DECL(int) SSMR3PutS16(PSSMHANDLE pSSM, int16_t i16);
459VMMR3DECL(int) SSMR3PutU32(PSSMHANDLE pSSM, uint32_t u32);
460VMMR3DECL(int) SSMR3PutS32(PSSMHANDLE pSSM, int32_t i32);
461VMMR3DECL(int) SSMR3PutU64(PSSMHANDLE pSSM, uint64_t u64);
462VMMR3DECL(int) SSMR3PutS64(PSSMHANDLE pSSM, int64_t i64);
463VMMR3DECL(int) SSMR3PutU128(PSSMHANDLE pSSM, uint128_t u128);
464VMMR3DECL(int) SSMR3PutS128(PSSMHANDLE pSSM, int128_t i128);
465VMMR3DECL(int) SSMR3PutUInt(PSSMHANDLE pSSM, RTUINT u);
466VMMR3DECL(int) SSMR3PutSInt(PSSMHANDLE pSSM, RTINT i);
467VMMR3DECL(int) SSMR3PutGCUInt(PSSMHANDLE pSSM, RTGCUINT u);
468VMMR3DECL(int) SSMR3PutGCUIntReg(PSSMHANDLE pSSM, RTGCUINTREG u);
469VMMR3DECL(int) SSMR3PutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys);
470VMMR3DECL(int) SSMR3PutGCPhys64(PSSMHANDLE pSSM, RTGCPHYS64 GCPhys);
471VMMR3DECL(int) SSMR3PutGCPhys(PSSMHANDLE pSSM, RTGCPHYS GCPhys);
472VMMR3DECL(int) SSMR3PutGCPtr(PSSMHANDLE pSSM, RTGCPTR GCPtr);
473VMMR3DECL(int) SSMR3PutGCUIntPtr(PSSMHANDLE pSSM, RTGCUINTPTR GCPtr);
474VMMR3DECL(int) SSMR3PutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr);
475VMMR3DECL(int) SSMR3PutIOPort(PSSMHANDLE pSSM, RTIOPORT IOPort);
476VMMR3DECL(int) SSMR3PutSel(PSSMHANDLE pSSM, RTSEL Sel);
477VMMR3DECL(int) SSMR3PutMem(PSSMHANDLE pSSM, const void *pv, size_t cb);
478VMMR3DECL(int) SSMR3PutStrZ(PSSMHANDLE pSSM, const char *psz);
479/** @} */
480
481
482
483/** Load operations.
484 * @{
485 */
486VMMR3DECL(int) SSMR3GetStruct(PSSMHANDLE pSSM, void *pvStruct, PCSSMFIELD paFields);
487VMMR3DECL(int) SSMR3GetBool(PSSMHANDLE pSSM, bool *pfBool);
488VMMR3DECL(int) SSMR3GetU8(PSSMHANDLE pSSM, uint8_t *pu8);
489VMMR3DECL(int) SSMR3GetS8(PSSMHANDLE pSSM, int8_t *pi8);
490VMMR3DECL(int) SSMR3GetU16(PSSMHANDLE pSSM, uint16_t *pu16);
491VMMR3DECL(int) SSMR3GetS16(PSSMHANDLE pSSM, int16_t *pi16);
492VMMR3DECL(int) SSMR3GetU32(PSSMHANDLE pSSM, uint32_t *pu32);
493VMMR3DECL(int) SSMR3GetS32(PSSMHANDLE pSSM, int32_t *pi32);
494VMMR3DECL(int) SSMR3GetU64(PSSMHANDLE pSSM, uint64_t *pu64);
495VMMR3DECL(int) SSMR3GetS64(PSSMHANDLE pSSM, int64_t *pi64);
496VMMR3DECL(int) SSMR3GetU128(PSSMHANDLE pSSM, uint128_t *pu128);
497VMMR3DECL(int) SSMR3GetS128(PSSMHANDLE pSSM, int128_t *pi128);
498VMMR3DECL(int) SSMR3GetUInt(PSSMHANDLE pSSM, PRTUINT pu);
499VMMR3DECL(int) SSMR3GetSInt(PSSMHANDLE pSSM, PRTINT pi);
500VMMR3DECL(int) SSMR3GetGCUInt(PSSMHANDLE pSSM, PRTGCUINT pu);
501VMMR3DECL(int) SSMR3GetGCUIntReg(PSSMHANDLE pSSM, PRTGCUINTREG pu);
502VMMR3DECL(int) SSMR3GetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys);
503VMMR3DECL(int) SSMR3GetGCPhys64(PSSMHANDLE pSSM, PRTGCPHYS64 pGCPhys);
504VMMR3DECL(int) SSMR3GetGCPhys(PSSMHANDLE pSSM, PRTGCPHYS pGCPhys);
505VMMR3DECL(int) SSMR3GetGCPtr(PSSMHANDLE pSSM, PRTGCPTR pGCPtr);
506VMMR3DECL(int) SSMR3GetGCUIntPtr(PSSMHANDLE pSSM, PRTGCUINTPTR pGCPtr);
507VMMR3DECL(int) SSMR3GetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr);
508VMMR3DECL(int) SSMR3GetIOPort(PSSMHANDLE pSSM, PRTIOPORT pIOPort);
509VMMR3DECL(int) SSMR3GetSel(PSSMHANDLE pSSM, PRTSEL pSel);
510VMMR3DECL(int) SSMR3GetMem(PSSMHANDLE pSSM, void *pv, size_t cb);
511VMMR3DECL(int) SSMR3GetStrZ(PSSMHANDLE pSSM, char *psz, size_t cbMax);
512VMMR3DECL(int) SSMR3GetStrZEx(PSSMHANDLE pSSM, char *psz, size_t cbMax, size_t *pcbStr);
513VMMR3DECL(int) SSMR3GetTimer(PSSMHANDLE pSSM, PTMTIMER pTimer);
514VMMR3DECL(int) SSMR3Skip(PSSMHANDLE pSSM, size_t cb);
515VMMR3DECL(int) SSMR3SkipToEndOfUnit(PSSMHANDLE pSSM);
516
517/** @} */
518
519/** @} */
520#endif /* IN_RING3 */
521
522
523/** @} */
524
525RT_C_DECLS_END
526
527#endif
528
Note: See TracBrowser for help on using the repository browser.

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