VirtualBox

root/trunk/include/VBox/err.h

Revision 13703, 59.2 kB (checked in by vboxsync, 3 weeks ago)

VMM++: VINF_EM_DBG_RING0_ASSERTION -> VERR_VMM_RING0_ASSERTION, lumping it together with VERR_TRPM_DONT_PANIC and VERR_TRPM_PANIC. (just left the space in VINF_EM_ there as it may come in handy later.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /** @file
2  * VirtualBox Status Codes.
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_err_h
31 #define ___VBox_err_h
32
33 #include <VBox/cdefs.h>
34 #include <iprt/err.h>
35
36
37 /** @defgroup grp_err       Error Codes
38  * @{
39  */
40
41 /* SED-START */
42
43 /** @name Misc. Status Codes
44  * @{
45  */
46 /** Failed to allocate VM memory. */
47 #define VERR_NO_VM_MEMORY                   (-1000)
48 /** GC is toasted and the VMM should be terminated at once, but no need to panic about it :-) */
49 #define VERR_DONT_PANIC                     (-1001)
50 /** Unsupported CPU. */
51 #define VERR_UNSUPPORTED_CPU                (-1002)
52 /** Unsupported CPU mode. */
53 #define VERR_UNSUPPORTED_CPU_MODE           (-1003)
54 /** Page not present. */
55 #define VERR_PAGE_NOT_PRESENT               (-1004)
56 /** Invalid/Corrupted configuration file. */
57 #define VERR_CFG_INVALID_FORMAT             (-1005)
58 /** No configuration value exists. */
59 #define VERR_CFG_NO_VALUE                   (-1006)
60 /** Not selector not present. */
61 #define VERR_SELECTOR_NOT_PRESENT           (-1007)
62 /** Not code selector. */
63 #define VERR_NOT_CODE_SELECTOR              (-1008)
64 /** Not data selector. */
65 #define VERR_NOT_DATA_SELECTOR              (-1009)
66 /** Out of selector bounds. */
67 #define VERR_OUT_OF_SELECTOR_BOUNDS         (-1010)
68 /** Invalid selector. Usually beyond table limits. */
69 #define VERR_INVALID_SELECTOR               (-1011)
70 /** Invalid requested privilegde level. */
71 #define VERR_INVALID_RPL                    (-1012)
72 /** PML4 entry not present. */
73 #define VERR_PAGE_MAP_LEVEL4_NOT_PRESENT    (-1013)
74 /** Page directory pointer not present. */
75 #define VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT (-1014)
76 /** @} */
77
78
79 /** @name Execution Monitor/Manager (EM) Status Codes
80  *
81  * The order of the status codes between VINF_EM_FIRST and VINF_EM_LAST
82  * are of vital importance. The lower the number the higher importance
83  * as a scheduling instruction.
84  * @{
85  */
86 /** First scheduling related status code. */
87 #define VINF_EM_FIRST                       1100
88 /** Indicating that the VM is being terminated and that the the execution
89  * shall stop. */
90 #define VINF_EM_TERMINATE                   1100
91 /** Hypervisor code was stepped.
92  * EM will first send this to the debugger, and if the issue isn't
93  * resolved there it will enter guru meditation. */
94 #define VINF_EM_DBG_HYPER_STEPPED           1101
95 /** Hit a breakpoint in the hypervisor code,
96  * EM will first send this to the debugger, and if the issue isn't
97  * resolved there it will enter guru meditation. */
98 #define VINF_EM_DBG_HYPER_BREAKPOINT        1102
99 /** Hit a possible assertion in the hypervisor code,
100  * EM will first send this to the debugger, and if the issue isn't
101  * resolved there it will enter guru meditation. */
102 #define VINF_EM_DBG_HYPER_ASSERTION         1103
103 /** Indicating that the VM should be suspended for debugging because
104  * the developer wants to inspect the VM state. */
105 #define VINF_EM_DBG_STOP                    1105
106 /** Indicating success single stepping and that EM should report that
107  * event to the debugger. */
108 #define VINF_EM_DBG_STEPPED                 1106
109 /** Indicating that a breakpoint was hit and that EM should notify the debugger
110  * and in the event there is no debugger fail fatally. */
111 #define VINF_EM_DBG_BREAKPOINT              1107
112 /** Indicating that EM should single step an instruction.
113  * The instruction is stepped in the current execution mode (RAW/REM). */
114 #define VINF_EM_DBG_STEP                    1108
115 /** Indicating that the VM is being turned off and that the EM should
116  * exit to the VM awaiting the destruction request. */
117 #define VINF_EM_OFF                         1109
118 /** Indicating that the VM has been reset and that scheduling goes
119  * back to startup defaults. */
120 #define VINF_EM_RESET                       1110
121 /** Indicating that the VM has been suspended and that the the thread
122  * should wait for request telling it what to do next. */
123 #define VINF_EM_SUSPEND                     1111
124 /** Indicating that the VM has executed a halt instruction and that
125  * the emulation thread should wait for an interrupt before resuming
126  * execution. */
127 #define VINF_EM_HALT                        1112
128 /** Indicating that the VM has been resumed and that the thread should
129  * start executing. */
130 #define VINF_EM_RESUME                      1113
131 /** Indicating that we've got an out-of-memory condition and that we need
132  * to take the appropriate actions to deal with this.
133  * @remarks It might seem odd at first that this has lower priority than VINF_EM_HALT,
134  *          VINF_EM_SUSPEND, and VINF_EM_RESUME. The reason is that these events are
135  *          vital to correctly operating the VM. Also, they can't normally occur together
136  *          with an out-of-memory condition, and even if that should happen the condition
137  *          will be rediscovered before executing any more code. */
138 #define VINF_EM_NO_MEMORY                   1114
139 /** The fatal variant of VINF_EM_NO_MEMORY. */
140 #define VERR_EM_NO_MEMORY                   (-1114)
141 /** Indicating that a rescheduling to recompiled execution.
142  * Typically caused by raw-mode executing code which is difficult/slow
143  * to virtualize rawly.
144  * @remarks Important to have a higher priority (lower number) than the other rescheduling status codes. */
145 #define VINF_EM_RESCHEDULE_REM              1115
146 /** Indicating that a rescheduling to vmx-mode execution.
147  * Typically caused by REM detecting that hardware-accelerated raw-mode execution is possible. */
148 #define VINF_EM_RESCHEDULE_HWACC            1116
149 /** Indicating that a rescheduling to raw-mode execution.
150  * Typically caused by REM detecting that raw-mode execution is possible.
151  * @remarks Important to have a higher priority (lower number) than VINF_EM_RESCHEDULE. */
152 #define VINF_EM_RESCHEDULE_RAW              1117
153 /** Indicating that a rescheduling now is required. Typically caused by
154  * interrupts having changed the EIP. */
155 #define VINF_EM_RESCHEDULE                  1118
156 /** PARAV call */
157 #define VINF_EM_RESCHEDULE_PARAV            1119
158 /** Last scheduling related status code. (inclusive) */
159 #define VINF_EM_LAST                        1119
160
161 /** Reason for leaving GC: Guest trap which couldn't be handled in GC.
162  * The trap is generally forwared to the REM and executed there. */
163 #define VINF_EM_RAW_GUEST_TRAP              1121
164 /** Reason for leaving GC: Interrupted by external interrupt.
165  * The interrupt needed to be handled by the host OS. */
166 #define VINF_EM_RAW_INTERRUPT               1122
167 /** Reason for leaving GC: Interrupted by external interrupt while in hypervisor code.
168  * The interrupt needed to be handled by the host OS and hypervisor execution must be
169  * resumed. VM state is not complete at this point. */
170 #define VINF_EM_RAW_INTERRUPT_HYPER         1123
171 /** Reason for leaving GC: A Ring switch was attempted.
172  * Normal cause of action is to execute this in REM. */
173 #define VINF_EM_RAW_RING_SWITCH             1124
174 /** Reason for leaving GC: A Ring switch was attempted using software interrupt.
175  * Normal cause of action is to execute this in REM. */
176 #define VINF_EM_RAW_RING_SWITCH_INT         1125
177 /** Reason for leaving GC: A privileged instruction was attempted executed.
178  * Normal cause of action is to execute this in REM. */
179 #define VINF_EM_RAW_EXCEPTION_PRIVILEGED    1126
180
181 /** Reason for leaving GC: Emulate instruction. */
182 #define VINF_EM_RAW_EMULATE_INSTR           1127
183 /** Reason for leaving GC: Unhandled TSS write.
184  * Recompiler gets control. */
185 #define VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT 1128
186 /** Reason for leaving GC: Unhandled LDT write.
187  * Recompiler gets control. */
188 #define VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT 1129
189 /** Reason for leaving GC: Unhandled IDT write.
190  * Recompiler gets control. */
191 #define VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT 1130
192 /** Reason for leaving GC: Unhandled GDT write.
193  * Recompiler gets control. */
194 #define VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT 1131
195 /** Reason for leaving GC: Unhandled Page Directory write.
196  * Recompiler gets control. */
197 #define VINF_EM_RAW_EMULATE_INSTR_PD_FAULT  1132
198 /** Reason for leaving GC: jump inside generated patch jump.
199  * Fatal error. */
200 #define VERR_EM_RAW_PATCH_CONFLICT          (-1133)
201 /** Reason for leaving GC: Hlt instruction.
202  * Recompiler gets control. */
203 #define VINF_EM_RAW_EMULATE_INSTR_HLT       1134
204 /** Reason for leaving GC: Ring-3 operation pending. */
205 #define VINF_EM_RAW_TO_R3                   1135
206 /** Reason for leaving GC: Timer pending. */
207 #define VINF_EM_RAW_TIMER_PENDING           1136
208 /** Reason for leaving GC: Interrupt pending (guest). */
209 #define VINF_EM_RAW_INTERRUPT_PENDING       1137
210 /** Reason for leaving GC: Encountered a stale selector. */
211 #define VINF_EM_RAW_STALE_SELECTOR          1138
212 /** Reason for leaving GC: The IRET resuming guest code trapped. */
213 #define VINF_EM_RAW_IRET_TRAP               1139
214 /** The interpreter was unable to deal with the instruction at hand. */
215 #define VERR_EM_INTERPRETER                 (-1148)
216 /** Internal EM error caused by an unknown warning or informational status code. */
217 #define VERR_EM_INTERNAL_ERROR              (-1149)
218 /** Pending VM request packet. */
219 #define VINF_EM_PENDING_REQUEST             (-1150)
220 /** @} */
221
222
223 /** @name Debugging Facility (DBGF) DBGF Status Codes
224  * @{
225  */
226 /** The function called requires the caller to be attached as a
227  * debugger to the VM. */
228 #define VERR_DBGF_NOT_ATTACHED              (-1200)
229 /** Someone (including the caller) was already attached as
230  * debugger to the VM. */
231 #define VERR_DBGF_ALREADY_ATTACHED          (-1201)
232 /** Tried to hald a debugger which was already halted.
233  * (This is a warning and not an error.) */
234 #define VWRN_DBGF_ALREADY_HALTED            1202
235 /** The DBGF has no more free breakpoint slots. */
236 #define VERR_DBGF_NO_MORE_BP_SLOTS          (-1203)
237 /** The DBGF couldn't find the specified breakpoint. */
238 #define VERR_DBGF_BP_NOT_FOUND              (-1204)
239 /** Attempted to enabled a breakpoint which was already enabled. */
240 #define VINF_DBGF_BP_ALREADY_ENABLED        1205
241 /** Attempted to disabled a breakpoint which was already disabled. */
242 #define VINF_DBGF_BP_ALREADY_DISABLED       1206
243 /** The breakpoint already exists. */
244 #define VINF_DBGF_BP_ALREADY_EXIST          1207
245 /** The byte string was not found. */
246 #define VERR_DBGF_MEM_NOT_FOUND             (-1208)
247 /** The OS was not detected. */
248 #define VERR_DBGF_OS_NOT_DETCTED            (-1209)
249 /** The OS was not detected. */
250 #define VINF_DBGF_OS_NOT_DETCTED            1209
251 /** @} */
252
253
254 /** @name Patch Manager (PATM) Status Codes
255  * @{
256  */
257 /** Non fatal Patch Manager analysis phase warning */
258 #define VWRN_CONTINUE_ANALYSIS              1400
259 /** Non fatal Patch Manager recompile phase warning (mapped to VWRN_CONTINUE_ANALYSIS). */
260 #define VWRN_CONTINUE_RECOMPILE             VWRN_CONTINUE_ANALYSIS
261 /** Continue search (mapped to VWRN_CONTINUE_ANALYSIS). */
262 #define VWRN_PATM_CONTINUE_SEARCH           VWRN_CONTINUE_ANALYSIS
263 /** Patch installation refused (patch too complex or unsupported instructions ) */
264 #define VERR_PATCHING_REFUSED               (-1401)
265 /** Unable to find patch */
266 #define VERR_PATCH_NOT_FOUND                (-1402)
267 /** Patch disabled */
268 #define VERR_PATCH_DISABLED                 (-1403)
269 /** Patch enabled */
270 #define VWRN_PATCH_ENABLED                  1404
271 /** Patch was already disabled */
272 #define VERR_PATCH_ALREADY_DISABLED         (-1405)
273 /** Patch was already enabled */
274 #define VERR_PATCH_ALREADY_ENABLED          (-1406)
275 /** Patch was removed. */
276 #define VWRN_PATCH_REMOVED                  1408
277
278 /** Reason for leaving GC: \#GP with EIP pointing to patch code. */
279 #define VINF_PATM_PATCH_TRAP_GP             1408
280 /** First leave GC code. */
281 #define VINF_PATM_LEAVEGC_FIRST             VINF_PATM_PATCH_TRAP_GP
282 /** Reason for leaving GC: \#PF with EIP pointing to patch code. */
283 #define VINF_PATM_PATCH_TRAP_PF             1409
284 /** Reason for leaving GC: int3 with EIP pointing to patch code. */
285 #define VINF_PATM_PATCH_INT3                1410
286 /** Reason for leaving GC: \#PF for monitored patch page. */
287 #define VINF_PATM_CHECK_PATCH_PAGE          1411
288 /** Reason for leaving GC: duplicate instruction called at current eip. */
289 #define VINF_PATM_DUPLICATE_FUNCTION        1412
290 /** Execute one instruction with the recompiler */
291 #define VINF_PATCH_EMULATE_INSTR            1413
292 /** Reason for leaving GC: attempt to patch MMIO write. */
293 #define VINF_PATM_HC_MMIO_PATCH_WRITE       1414
294 /** Reason for leaving GC: attempt to patch MMIO read. */
295 #define VINF_PATM_HC_MMIO_PATCH_READ        1415
296 /** Reason for leaving GC: pending irq after iret that sets IF. */
297 #define VINF_PATM_PENDING_IRQ_AFTER_IRET    1416
298 /** Last leave GC code. */
299 #define VINF_PATM_LEAVEGC_LAST              VINF_PATM_PENDING_IRQ_AFTER_IRET
300
301 /** No conflicts to resolve */
302 #define VERR_PATCH_NO_CONFLICT              (-1425)
303 /** Detected unsafe code for patching */
304 #define VERR_PATM_UNSAFE_CODE               (-1426)
305 /** Terminate search branch */
306 #define VWRN_PATCH_END_BRANCH                1427
307 /** Already patched */
308 #define VERR_PATM_ALREADY_PATCHED           (-1428)
309 /** Spinlock detection failed. */
310 #define VINF_PATM_SPINLOCK_FAILED           (1429)
311 /** Continue execution after patch trap. */
312 #define VINF_PATCH_CONTINUE                 (1430)
313
314 /** @} */
315
316
317 /** @name Code Scanning and Analysis Manager (CSAM) Status Codes
318  * @{
319  */
320 /** Trap not handled */
321 #define VWRN_CSAM_TRAP_NOT_HANDLED          1500
322 /** Patch installed */
323 #define VWRN_CSAM_INSTRUCTION_PATCHED       1501
324 /** Page record not found */
325 #define VWRN_CSAM_PAGE_NOT_FOUND            1502
326 /** Reason for leaving GC: CSAM wants perform a task in ring-3. */
327 #define VINF_CSAM_PENDING_ACTION            1503
328 /** @} */
329
330
331 /** @name Page Monitor/Manager (PGM) Status Codes
332  * @{
333  */
334 /** Attempt to create a GC mapping which conflicts with an existing mapping. */
335 #define VERR_PGM_MAPPING_CONFLICT           (-1600)
336 /** The physical handler range has no corresponding RAM range.
337  * If this is MMIO, see todo above the return. If not MMIO, then it's
338  * someone else's fault... */
339 #define VERR_PGM_HANDLER_PHYSICAL_NO_RAM_RANGE (-1601)
340 /** Attempt to register an access handler for a virtual range of which a part
341  * was already handled. */
342 #define VERR_PGM_HANDLER_VIRTUAL_CONFLICT   (-1602)
343 /** Attempt to register an access handler for a physical range of which a part
344  * was already handled. */
345 #define VERR_PGM_HANDLER_PHYSICAL_CONFLICT  (-1603)
346 /** Invalid page directory specified to PGM. */
347 #define VERR_PGM_INVALID_PAGE_DIRECTORY     (-1604)
348 /** Invalid GC physical address. */
349 #define VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS (-1605)
350 /** Invalid GC physical range. Usually used when a specified range crosses
351  * a RAM region boundrary. */
352 #define VERR_PGM_INVALID_GC_PHYSICAL_RANGE  (-1606)
353 /** Specified access handler was not found. */
354 #define VERR_PGM_HANDLER_NOT_FOUND          (-1607)
355 /** Attempt to register a RAM range of which parts are already
356  * covered by existing RAM ranges. */
357 #define VERR_PGM_RAM_CONFLICT               (-1608)
358 /** Failed to add new mappings because the current mappings are fixed
359  * in guest os memory. */
360 #define VERR_PGM_MAPPINGS_FIXED             (-1609)
361 /** Failed to fix mappings because of a conflict with the intermediate code. */
362 #define VERR_PGM_MAPPINGS_FIX_CONFLICT      (-1610)
363 /** Failed to fix mappings because a mapping rejected the address. */
364 #define VERR_PGM_MAPPINGS_FIX_REJECTED      (-1611)
365 /** Failed to fix mappings because the proposed memory area was to small. */
366 #define VERR_PGM_MAPPINGS_FIX_TOO_SMALL     (-1612)
367 /** Reason for leaving GC: The urge to syncing CR3. */
368 #define VINF_PGM_SYNC_CR3                   1613
369 /** Page not marked for dirty bit tracking */
370 #define VINF_PGM_NO_DIRTY_BIT_TRACKING      1614
371 /** Page fault caused by dirty bit tracking; corrected */
372 #define VINF_PGM_HANDLED_DIRTY_BIT_FAULT    1615
373 /** Go ahead with the default Read/Write operation.
374  * This is returned by a HC physical or virtual handler when it wants the PGMPhys[Read|Write]
375  * routine do the reading/writing. */
376 #define VINF_PGM_HANDLER_DO_DEFAULT         1616
377 /** The paging mode of the host is not supported yet. */
378 #define VERR_PGM_UNSUPPORTED_HOST_PAGING_MODE (-1617)
379 /** The physical guest page is a reserved/mmio page and does not have any HC address. */
380 #define VERR_PGM_PHYS_PAGE_RESERVED         (-1618)
381 /** No page directory available for the hypervisor. */
382 #define VERR_PGM_NO_HYPERVISOR_ADDRESS      (-1619)
383 /** The shadow page pool was flushed.
384  * This means that a global CR3 sync was flagged. Anyone receiving this kind of status
385  * will have to get down to a SyncCR3 ASAP. See also VINF_PGM_SYNC_CR3. */
386 #define VERR_PGM_POOL_FLUSHED               (-1620)
387 /** The shadow page pool was cleared.
388  * This is a error code internal to the shadow page pool, it will be
389  * converted to a VERR_PGM_POOL_FLUSHED before leaving the pool code. */
390 #define VERR_PGM_POOL_CLEARED               (-1621)
391 /** The returned shadow page is cached. */
392 #define VINF_PGM_CACHED_PAGE                1622
393 /** Returned by handler registration, modification and deregistration
394  * when the shadow PTs could be updated because the guest page
395  * aliased or/and mapped by multiple PTs. */
396 #define VINF_PGM_GCPHYS_ALIASED             1623
397 /** Reason for leaving GC: Paging mode changed.
398  * PGMChangeMode() uses this to force a switch to HC so it can safely
399  * deal with a mode switch.
400  */
401 #define VINF_PGM_CHANGE_MODE                1624
402 /** SyncPage modified the PDE.
403  * This is an internal status code used to communicate back to the \#PF handler
404  * that the PDE was (probably) marked not-present and it should restart the instruction. */
405 #define VINF_PGM_SYNCPAGE_MODIFIED_PDE      1625
406 /** Physical range crosses dynamic ram chunk boundary; translation to HC ptr not safe. */
407 #define VERR_PGM_GCPHYS_RANGE_CROSSES_BOUNDARY  (-1626)
408 /** Conflict between the core memory and the intermediate paging context, try again.
409  * There are some very special conditions applying to the intermediate paging context
410  * (used during the world switches), and some times we continuously run into these
411  * when asking the host kernel for memory during VM init. Let us know if you run into
412  * this and we'll adjust the code so it tries harder to avoid it.
413  */
414 #define VERR_PGM_INTERMEDIATE_PAGING_CONFLICT   (-1627)
415 /** The shadow paging mode is not supported yet. */
416 #define VERR_PGM_UNSUPPORTED_SHADOW_PAGING_MODE (-1628)
417
418 /** @} */
419
420
421 /** @name Memory Monitor (MM) Status Codes
422  * @{
423  */
424 /** Attempt to register a RAM range of which parts are already
425  * covered by existing RAM ranges. */
426 #define VERR_MM_RAM_CONFLICT                (-1700)
427 /** Hypervisor memory allocation failed. */
428 #define VERR_MM_HYPER_NO_MEMORY             (-1701)
429
430 /** @} */
431
432
433 /** @name Save State Manager (SSM) Status Codes
434  * @{
435  */
436 /** The specified data unit already exist. */
437 #define VERR_SSM_UNIT_EXISTS                (-1800)
438 /** The specified data unit wasn't found. */
439 #define VERR_SSM_UNIT_NOT_FOUND             (-1801)
440 /** The specified data unit wasn't owned by caller. */
441 #define VERR_SSM_UNIT_NOT_OWNER             (-1802)
442 /** General saved state file integrity error. */
443 #define VERR_SSM_INTEGRITY                  (-1810)
444 /** The saved state file magic was not recognized. */
445 #define VERR_SSM_INTEGRITY_MAGIC            (-1811)
446 /** The saved state file version is not supported. */
447 #define VERR_SSM_INTEGRITY_VERSION          (-1812)
448 /** The saved state file size didn't match the one in the header. */
449 #define VERR_SSM_INTEGRITY_SIZE             (-1813)
450 /** The CRC of the saved state file did match. */
451 #define VERR_SSM_INTEGRITY_CRC              (-1814)
452 /** The current virtual machine id didn't match the virtual machine id. */
453 #define VERR_SMM_INTEGRITY_MACHINE          (-1815)
454 /** Invalid unit magic (internal data tag). */
455 #define VERR_SSM_INTEGRITY_UNIT_MAGIC       (-1816)
456 /** The file contained a data unit which no-one wants. */
457 #define VERR_SSM_INTEGRITY_UNIT_NOT_FOUND   (-1817)
458 /** A data unit in the saved state file was defined but didn't any
459  * routine for processing it. */
460 #define VERR_SSM_NO_LOAD_EXEC               (-1818)
461 /** A restore routine attempted to load more data then the unit contained. */
462 #define VERR_SSM_LOADED_TOO_MUCH            (-1819)
463 /** Not in the correct state for the attempted operation. */
464 #define VERR_SSM_INVALID_STATE              (-1820)
465
466 /** Unsupported data unit version.
467  * A SSM user returns this if it doesn't know the u32Version. */
468 #define VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION  (-1821)
469 /** The format of a data unit has changed.
470  * A SSM user returns this if it's not able to read the format for
471  * other reasons than u32Version. */
472 #define VERR_SSM_DATA_UNIT_FORMAT_CHANGED       (-1822)
473 /** The CPUID instruction returns different information when loading than when saved.
474  * Normally caused by hardware changes on the host, but could also be caused by
475  * changes in the BIOS setup. */
476 #define VERR_SSM_LOAD_CPUID_MISMATCH            (-1823)
477 /** The RAM size differes between the saved state and the VM config. */
478 #define VERR_SSM_LOAD_MEMORY_SIZE_MISMATCH      (-1824)
479 /** The state doesn't match the VM configuration in one or another way.
480  * (There are certain PCI reconfiguration which the OS could potentially
481  * do which can cause this problem. Check this out when it happens.) */
482 #define VERR_SSM_LOAD_CONFIG_MISMATCH           (-1825)
483 /** The virtual clock freqency differs too much.
484  * The clock source for the virtual time isn't reliable or the code have changed. */
485 #define VERR_SSM_VIRTUAL_CLOCK_HZ               (-1826)
486 /** A timeout occured while waiting for async IDE operations to finish. */
487 #define VERR_SSM_IDE_ASYNC_TIMEOUT              (-1827)
488 /** One of the structure magics was wrong. */
489 #define VERR_SSM_STRUCTURE_MAGIC                (-1828)
490 /** The data in the saved state doesn't confirm to expectations. */
491 #define VERR_SSM_UNEXPECTED_DATA                (-1829)
492 /** @} */
493
494
495 /** @name Virtual Machine (VM) Status Codes
496  * @{
497  */
498 /** The specified at reset handler wasn't found. */
499 #define VERR_VM_ATRESET_NOT_FOUND               (-1900)
500 /** Invalid VM request type.
501  * For the VMR3ReqAlloc() case, the caller just specified an illegal enmType. For
502  * all the other occurences it means indicates corruption, broken logic, or stupid
503  * interface user. */
504 #define VERR_VM_REQUEST_INVALID_TYPE            (-1901)
505 /** Invalid VM request state.
506  * The state of the request packet was not the expected and accepted one(s). Either
507  * the interface user screwed up, or we've got corruption/broken logic. */
508 #define VERR_VM_REQUEST_STATE                   (-1902)
509 /** Invalid VM request packet.
510  * One or more of the the VM controlled packet members didn't contain the correct
511  * values. Some thing's broken. */
512 #define VERR_VM_REQUEST_INVALID_PACKAGE         (-1903)
513 /** The status field has not been updated yet as the request is still
514  * pending completion. Someone queried the iStatus field before the request
515  * has been fully processed. */
516 #define VERR_VM_REQUEST_STATUS_STILL_PENDING    (-1904)
517 /** The request has been freed, don't read the status now.
518  * Someone is reading the iStatus field of a freed request packet. */
519 #define VERR_VM_REQUEST_STATUS_FREED            (-1905)
520 /** A VM api requiring EMT was called from another thread.
521  * Use the VMR3ReqCall() apis to call it! */
522 #define VERR_VM_THREAD_NOT_EMT                  (-1906)
523 /** The VM state was invalid for the requested operation.
524  * Go check the 'VM Statechart Diagram.gif'. */
525 #define VERR_VM_INVALID_VM_STATE                (-1907)
526 /** The support driver is not installed.
527  * On linux, open returned ENOENT. */
528 #define VERR_VM_DRIVER_NOT_INSTALLED            (-1908)
529 /** The support driver is not accessible.
530  * On linux, open returned EPERM. */
531 #define VERR_VM_DRIVER_NOT_ACCESSIBLE           (-1909)
532 /** Was not able to load the support driver.
533  * On linux, open returned ENODEV. */
534 #define VERR_VM_DRIVER_LOAD_ERROR               (-1910)
535 /** Was not able to open the support driver.
536  * Generic open error used when none of the other ones fit. */
537 #define VERR_VM_DRIVER_OPEN_ERROR               (-1911)
538 /** The installed support driver doesn't match the version of the user. */
539 #define VERR_VM_DRIVER_VERSION_MISMATCH         (-1912)
540 /** Saving the VM state is temporarily not allowed. Try again later. */
541 #define VERR_VM_SAVE_STATE_NOT_ALLOWED          (-1913)
542 /** @} */
543
544
545 /** @name VBox Remote Desktop Protocol (VRDP) Status Codes
546  * @{
547  */
548 /** Successful completion of operation (mapped to generic iprt status code). */
549 #define VINF_VRDP_SUCCESS                   VINF_SUCCESS
550 /** VRDP transport operation timed out (mapped to generic iprt status code). */
551 #define VERR_VRDP_TIMEOUT                   VERR_TIMEOUT
552
553 /** Unsupported ISO protocol feature */
554 #define VERR_VRDP_ISO_UNSUPPORTED           (-2000)
555 /** Security (en/decryption) engine error */
556 #define VERR_VRDP_SEC_ENGINE_FAIL           (-2001)
557 /** VRDP protocol violation */
558 #define VERR_VRDP_PROTOCOL_ERROR            (-2002)
559 /** Unsupported VRDP protocol feature */
560 #define VERR_VRDP_NOT_SUPPORTED             (-2003)
561 /** VRDP protocol violation, client sends less data than expected */
562 #define VERR_VRDP_INSUFFICIENT_DATA         (-2004)
563 /** Internal error, VRDP packet is in wrong operation mode */
564 #define VERR_VRDP_INVALID_MODE              (-2005)
565 /** Memory allocation failed */
566 #define VERR_VRDP_NO_MEMORY                 (-2006)
567 /** Client has been rejected */
568 #define VERR_VRDP_ACCESS_DENIED             (-2007)
569 /** VRPD receives a packet that is not supported */
570 #define VWRN_VRDP_PDU_NOT_SUPPORTED         2008
571 /** VRDP script allowed the packet to be processed further */
572 #define VINF_VRDP_PROCESS_PDU               2009
573 /** VRDP script has completed its task */
574 #define VINF_VRDP_OPERATION_COMPLETED       2010
575 /** VRDP thread has started OK and will run */
576 #define VINF_VRDP_THREAD_STARTED            2011
577 /** Framebuffer is resized, terminate send bitmap procedure */
578 #define VINF_VRDP_RESIZE_REQUESTED          2012
579 /** Output can be enabled for the client. */
580 #define VINF_VRDP_OUTPUT_ENABLE             2013
581 /** @} */
582
583
584 /** @name Configuration Manager (CFGM) Status Codes
585  * @{
586  */
587 /** The integer value was too big for the requested representation. */
588 #define VERR_CFGM_INTEGER_TOO_BIG           (-2100)
589 /** Child node was not found. */
590 #define VERR_CFGM_CHILD_NOT_FOUND           (-2101)
591 /** Path to child node was invalid (i.e. empty). */
592 #define VERR_CFGM_INVALID_CHILD_PATH        (-2102)
593 /** Value not found. */
594 #define VERR_CFGM_VALUE_NOT_FOUND           (-2103)
595 /** No parent node specified. */
596 #define VERR_CFGM_NO_PARENT                 (-2104)
597 /** No node was specified. */
598 #define VERR_CFGM_NO_NODE                   (-2105)
599 /** The value is not an integer. */
600 #define VERR_CFGM_NOT_INTEGER               (-2106)
601 /** The value is not a zero terminated character string. */
602 #define VERR_CFGM_NOT_STRING                (-2107)
603 /** The value is not a byte string. */
604 #define VERR_CFGM_NOT_BYTES                 (-2108)
605 /** The specified string / bytes buffer was to small. Specify a larger one and retry. */
606 #define VERR_CFGM_NOT_ENOUGH_SPACE          (-2109)
607 /** The path of a new node contained slashs or was empty. */
608 #define VERR_CFGM_INVALID_NODE_PATH         (-2160)
609 /** A new node couldn't be inserted because one with the same name exists. */
610 #define VERR_CFGM_NODE_EXISTS               (-2161)
611 /** A new leaf couldn't be inserted because one with the same name exists. */
612 #define VERR_CFGM_LEAF_EXISTS               (-2162)
613 /** @} */
614
615
616 /** @name Time Manager (TM) Status Codes
617  * @{
618  */
619 /** The loaded timer state was incorrect. */
620 #define VERR_TM_LOAD_STATE                  (-2200)
621 /** The timer was not in the correct state for the request operation. */
622 #define VERR_TM_INVALID_STATE               (-2201)
623 /** The timer was in a unknown state. Corruption or stupid coding error. */
624 #define VERR_TM_UNKNOWN_STATE               (-2202)
625 /** The timer was stuck in an unstable state until we grew impatient and returned. */
626 #define VERR_TM_UNSTABLE_STATE              (-2203)
627 /** @} */
628
629
630 /** @name Recompiled Execution Manager (REM) Status Codes
631  * @{
632  */
633 /** Fatal error in virtual hardware. */
634 #define VERR_REM_VIRTUAL_HARDWARE_ERROR     (-2300)
635 /** Fatal error in the recompiler cpu. */
636 #define VERR_REM_VIRTUAL_CPU_ERROR          (-2301)
637 /** Recompiler execution was interrupted by forced action. */
638 #define VINF_REM_INTERRUPED_FF              2302
639 /** Reason for leaving GC: Must flush pending invlpg operations to REM.
640  * Tell REM to flush page invalidations. Will temporary go to REM context
641  * from REM and perform the flushes. */
642 #define VERR_REM_FLUSHED_PAGES_OVERFLOW     (-2303)
643 /** Too many similar traps. This is a very useful debug only
644  * check (we don't do double/tripple faults in REM). */
645 #define VERR_REM_TOO_MANY_TRAPS             (-2304)
646 /** The REM is out of breakpoint slots. */
647 #define VERR_REM_NO_MORE_BP_SLOTS           (-2305)
648 /** The REM could not find any breakpoint on the specified address. */
649 #define VERR_REM_BP_NOT_FOUND               (-2306)
650 /** @} */
651
652
653 /** @name Trap Manager / Monitor (TRPM) Status Codes
654  * @{
655  */
656 /** No active trap. Cannot query or reset a non-existing trap. */
657 #define VERR_TRPM_NO_ACTIVE_TRAP            (-2400)
658 /** Active trap. Cannot assert a new trap when when one is already active. */
659 #define VERR_TRPM_ACTIVE_TRAP               (-2401)
660 /** Reason for leaving GC: Guest tried to write to our IDT - fatal.
661  * The VM will be terminated assuming the worst, i.e. that the
662  * guest has read the idtr register. */
663 #define VERR_TRPM_SHADOW_IDT_WRITE          (-2402)
664 /** Reason for leaving GC: Fatal trap in hypervisor. */
665 #define VERR_TRPM_DONT_PANIC                (-2403)
666 /** Reason for leaving GC: Double Fault. */
667 #define VERR_TRPM_PANIC                     (-2404)
668 /** The exception was dispatched for raw-mode execution. */
669 #define VINF_TRPM_XCPT_DISPATCHED           2405
670 /** @} */
671
672
673 /** @name Selector Manager / Monitor (SELM) Status Code
674  * @{
675  */
676 /** Reason for leaving GC: Guest tried to write to our GDT - fatal.
677  * The VM will be terminated assuming the worst, i.e. that the
678  * guest has read the gdtr register. */
679 #define VERR_SELM_SHADOW_GDT_WRITE          (-2500)
680 /** Reason for leaving GC: Guest tried to write to our LDT - fatal.
681  * The VM will be terminated assuming the worst, i.e. that the
682  * guest has read the ldtr register. */
683 #define VERR_SELM_SHADOW_LDT_WRITE          (-2501)
684 /** Reason for leaving GC: Guest tried to write to our TSS - fatal.
685  * The VM will be terminated assuming the worst, i.e. that the
686  * guest has read the ltr register. */
687 #define VERR_SELM_SHADOW_TSS_WRITE          (-2502)
688 /** Reason for leaving GC: Sync the GDT table to solve a conflict. */
689 #define VINF_SELM_SYNC_GDT                  2503
690 /** No valid TSS present. */
691 #define VERR_SELM_NO_TSS                    (-2504)
692 /** @} */
693
694
695 /** @name I/O Manager / Monitor (IOM) Status Code
696  * @{
697  */
698 /** The specified I/O port range was invalid.
699  * It was either empty or it was out of bounds. */
700 #define VERR_IOM_INVALID_IOPORT_RANGE       (-2600)
701 /** The specified GC I/O port range didn't have a corresponding HC range.
702  * IOMIOPortRegisterHC() must be called before IOMIOPortRegisterGC(). */
703 #define VERR_IOM_NO_HC_IOPORT_RANGE         (-2601)
704 /** The specified I/O port range intruded on an existing range. There is
705  * a I/O port conflict between two device, or a device tried to register
706  * the same range twice. */
707 #define VERR_IOM_IOPORT_RANGE_CONFLICT      (-2602)
708 /** The I/O port range specified for removal wasn't found or it wasn't contiguous. */
709 #define VERR_IOM_IOPORT_RANGE_NOT_FOUND     (-2603)
710 /** The specified I/O port range was owned by some other device(s). Both registration
711  * and deregistration, but in the first case only GC ranges. */
712 #define VERR_IOM_NOT_IOPORT_RANGE_OWNER     (-2604)
713
714 /** The specified MMIO range was invalid.
715  * It was either empty or it was out of bounds. */
716 #define VERR_IOM_INVALID_MMIO_RANGE         (-2605)
717 /** The specified GC MMIO range didn't have a corresponding HC range.
718  * IOMMMIORegisterHC() must be called before IOMMMIORegisterGC(). */
719 #define VERR_IOM_NO_HC_MMIO_RANGE           (-2606)
720 /** The specified MMIO range was owned by some other device(s). Both registration
721  * and deregistration, but in the first case only GC ranges. */
722 #define VERR_IOM_NOT_MMIO_RANGE_OWNER       (-2607)
723 /** The specified MMIO range intruded on an existing range. There is
724  * a MMIO conflict between two device, or a device tried to register
725  * the same range twice. */
726 #define VERR_IOM_MMIO_RANGE_CONFLICT        (-2608)
727 /** The MMIO range specified for removal was not found. */
728 #define VERR_IOM_MMIO_RANGE_NOT_FOUND       (-2609)
729 /** The MMIO range specified for removal was invalid. The range didn't match
730  * quite match a set of existing ranges. It's not possible to remove parts of
731  * a MMIO range, only one or more full ranges. */
732 #define VERR_IOM_INCOMPLETE_MMIO_RANGE      (-2610)
733 /** An invalid I/O port size was specified for a read or write operation. */
734 #define VERR_IOM_INVALID_IOPORT_SIZE        (-2611)
735 /** The MMIO handler was called for a bogus address! Internal error! */
736 #define VERR_IOM_MMIO_HANDLER_BOGUS_CALL    (-2612)
737 /** The MMIO handler experienced a problem with the disassembler. */
738 #define VERR_IOM_MMIO_HANDLER_DISASM_ERROR  (-2613)
739 /** The port being read was not present(/unused) and IOM shall return ~0 according to size. */
740 #define VERR_IOM_IOPORT_UNUSED              (-2614)
741 /** Unused MMIO register read, fill with 00. */
742 #define VINF_IOM_MMIO_UNUSED_00             2615
743 /** Unused MMIO register read, fill with FF. */
744 #define VINF_IOM_MMIO_UNUSED_FF             2616
745
746 /** Reason for leaving GC: I/O port read. */
747 #define VINF_IOM_HC_IOPORT_READ             2620
748 /** Reason for leaving GC: I/O port write. */