Changeset 23785 in vbox for trunk/include/VBox
- Timestamp:
- Oct 14, 2009 11:53:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/ssm.h
r23783 r23785 134 134 /** No transformation. */ 135 135 SSMFIELDTRANS_NO_TRANSFORMATION, 136 /** Guest context (GC) physical address. */ 137 SSMFIELDTRANS_GCPHYS, 136 138 /** Guest context (GC) virtual address. */ 137 139 SSMFIELDTRANS_GCPTR, 138 /** Guest context (GC) physical address. */139 SSMFIELDTRANS_GCPHYS,140 140 /** Raw-mode context (RC) virtual address. */ 141 141 SSMFIELDTRANS_RCPTR, … … 152 152 /** Ignorable field. See SSMFIELD_ENTRY_IGNORE. */ 153 153 SSMFIELDTRANS_IGNORE, 154 /** Ignorable guest context (GC) physical address. */ 155 SSMFIELDTRANS_IGN_GCPHYS, 154 156 /** Ignorable guest context (GC) virtual address. */ 155 157 SSMFIELDTRANS_IGN_GCPTR, 156 /** Ignorable guest context (GC) physical address. */157 SSMFIELDTRANS_IGN_GCPHYS,158 158 /** Ignorable raw-mode context (RC) virtual address. */ 159 159 SSMFIELDTRANS_IGN_RCPTR, 160 160 /** Ignorable host context (HC) virtual address. */ 161 161 SSMFIELDTRANS_IGN_HCPTR, 162 163 /** Old field. 164 * Save as zeros and skip on restore (nowhere to restore it any longer). */ 165 SSMFIELDTRANS_OLD, 166 /** Old guest context (GC) physical address. */ 167 SSMFIELDTRANS_OLD_GCPHYS, 168 /** Old guest context (GC) virtual address. */ 169 SSMFIELDTRANS_OLD_GCPTR, 170 /** Old raw-mode context (RC) virtual address. */ 171 SSMFIELDTRANS_OLD_RCPTR, 172 /** Old host context (HC) virtual address. */ 173 SSMFIELDTRANS_OLD_HCPTR, 162 174 163 175 /** Padding that differs between 32-bit and 64-bit hosts. … … 190 202 ( (uintptr_t)(pfn) >= SSMFIELDTRANS_PAD_HC && (uintptr_t)(pfn) <= SSMFIELDTRANS_PAD_MSC32_AUTO ) 191 203 204 /** Tests if it's an entry for an old field. 205 * 206 * @returns true / false. 207 * @param pfn The SSMFIELD::pfnGetPutOrTransformer value. 208 */ 209 #define SSMFIELDTRANS_IS_OLD(pfn) \ 210 ( (uintptr_t)(pfn) >= SSMFIELDTRANS_OLD && (uintptr_t)(pfn) <= SSMFIELDTRANS_OLD_HCPTR ) 211 192 212 /** 193 213 * A structure field description. … … 213 233 RT_SIZEOFMEMB(Type, Field), \ 214 234 #Type "::" #Field \ 235 } 236 /** Emit a SSMFIELD array entry for an old field. 237 * @internal */ 238 #define SSMFIELD_ENTRY_OLD_INT(cb, enmTransformer) \ 239 { \ 240 (PFNSSMFIELDGETPUT)(uintptr_t)(enmTransformer), \ 241 UINT32_MAX / 2, \ 242 (cb), \ 243 "<old>" \ 215 244 } 216 245 /** Emit a SSMFIELD array entry for an alignment padding. … … 233 262 } 234 263 264 235 265 /** Emit a SSMFIELD array entry. */ 236 266 #define SSMFIELD_ENTRY(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_NO_TRANSFORMATION) 267 /** Emit a SSMFIELD array entry for a RTGCPHYS type. */ 268 #define SSMFIELD_ENTRY_GCPHYS(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_GCPHYS) 237 269 /** Emit a SSMFIELD array entry for a RTGCPTR type. */ 238 270 #define SSMFIELD_ENTRY_GCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_GCPTR) 239 /** Emit a SSMFIELD array entry for a RTGCPHYS type. */240 #define SSMFIELD_ENTRY_GCPHYS(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_GCPHYS)241 271 /** Emit a SSMFIELD array entry for a raw-mode context pointer. */ 242 272 #define SSMFIELD_ENTRY_RCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_RCPTR) … … 259 289 * It is stored as zeros if SSMSTRUCT_FLAGS_DONT_IGNORE is specified to 260 290 * SSMR3PutStructEx. The member is never touched upon restore. */ 261 #define SSMFIELD_ENTRY_IGNORE(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_ IGNORE)291 #define SSMFIELD_ENTRY_IGNORE(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_OLD) 262 292 /** Emit a SSMFIELD array entry for an ignorable RTGCPHYS type. */ 263 #define SSMFIELD_ENTRY_IGN_GCPHYS(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_ IGN_GCPHYS)293 #define SSMFIELD_ENTRY_IGN_GCPHYS(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_OLD_GCPHYS) 264 294 /** Emit a SSMFIELD array entry for an ignorable RTGCPHYS type. */ 265 #define SSMFIELD_ENTRY_IGN_GCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_ IGN_GCPTR)295 #define SSMFIELD_ENTRY_IGN_GCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_OLD_GCPTR) 266 296 /** Emit a SSMFIELD array entry for an ignorable raw-mode context pointer. */ 267 #define SSMFIELD_ENTRY_IGN_RCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_ IGN_RCPTR)297 #define SSMFIELD_ENTRY_IGN_RCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_OLD_RCPTR) 268 298 /** Emit a SSMFIELD array entry for an ignorable ring-3 or/and ring-0 pointer. */ 269 #define SSMFIELD_ENTRY_IGN_HCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_IGN_HCPTR) 299 #define SSMFIELD_ENTRY_IGN_HCPTR(Type, Field) SSMFIELD_ENTRY_INT(Type, Field, SSMFIELDTRANS_OLD_HCPTR) 300 301 /** Emit a SSMFIELD array entry for an old field that should be ignored now. 302 * It is stored as zeros and skipped on load. */ 303 #define SSMFIELD_ENTRY_OLD(cb) SSMFIELD_ENTRY_OLD_INT(cb, SSMFIELDTRANS_IGNORE) 304 /** Same as SSMFIELD_ENTRY_IGN_GCPHYS, except there is no structure field. */ 305 #define SSMFIELD_ENTRY_OLD_GCPHYS() SSMFIELD_ENTRY_OLD_INT(sizeof(RTGCPHYS), SSMFIELDTRANS_IGN_GCPHYS) 306 /** Same as SSMFIELD_ENTRY_IGN_GCPTR, except there is no structure field. */ 307 #define SSMFIELD_ENTRY_OLD_GCPTR() SSMFIELD_ENTRY_OLD_INT(sizeof(RTGCPTR), SSMFIELDTRANS_IGN_GCPTR) 308 /** Same as SSMFIELD_ENTRY_IGN_RCPTR, except there is no structure field. */ 309 #define SSMFIELD_ENTRY_OLD_RCPTR() SSMFIELD_ENTRY_OLD_INT(sizeof(RTRCPTR), SSMFIELDTRANS_IGN_RCPTR) 310 /** Same as SSMFIELD_ENTRY_IGN_HCPTR, except there is no structure field. */ 311 #define SSMFIELD_ENTRY_OLD_HCPTR() SSMFIELD_ENTRY_OLD_INT(sizeof(RTHCPTR), SSMFIELDTRANS_IGN_HCPTR) 270 312 271 313 /** Emit a SSMFIELD array entry for a padding that differs in size between
Note:
See TracChangeset
for help on using the changeset viewer.