Changeset 3145 in vbox for trunk/include/VBox
- Timestamp:
- Jun 18, 2007 3:31:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/iom.h
r2981 r3145 40 40 */ 41 41 #define IOM_NO_PDMINS_CHECKS 42 43 /** 44 * Macro for checking if an I/O or MMIO emulation call succeeded. 45 * 46 * This macro shall only be used with the IOM APIs where it's mentioned 47 * in the return value description. And there is must be used to correctly 48 * determin if the call succeeded and things like the EIP needs updating. 49 * 50 * 51 * @returns Success indicator (true/false). 52 * 53 * @param rc The status code. This may be evaluated 54 * more than once! 55 * 56 * @remark To avoid making assumptions about the layout of the 57 * VINF_EM_FIRST...VINF_EM_LAST range we're checking 58 * explicitly for each for exach the exceptions. 59 * However, for efficieny we ASSUME that the 60 * VINF_EM_LAST is smaller than most of the relevant 61 * status codes. We also ASSUME that the 62 * VINF_EM_RESCHEDULE_REM status code is the most 63 * frequent status code we'll enounter in this range. 64 * 65 * @todo Will have to add VINF_EM_DBG_HYPER_BREAKPOINT if the 66 * I/O port and MMIO breakpoints should trigger before 67 * the I/O is done. Currently, we don't implement these 68 * kind of breakpoints. 69 */ 70 #define IOM_SUCCESS(rc) ( (rc) == VINF_SUCCESS \ 71 || ( (rc) <= VINF_EM_LAST \ 72 && (rc) != VINF_EM_RESCHEDULE_REM \ 73 && (rc) >= VINF_EM_FIRST \ 74 && (rc) != VINF_EM_RESCHEDULE_RAW \ 75 && (rc) != VINF_EM_RESCHEDULE_HWACC \ 76 ) \ 77 ) 42 78 43 79 … … 263 299 * 264 300 * @returns Strict VBox status code. Informational status codes other than the one documented 265 * here are to be treated as internal failure. 266 * @retval VINF_SUCCESS Success. 267 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 301 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 302 * @retval VINF_SUCCESS Success. 303 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 304 * status code must be passed on to EM. 268 305 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 269 306 * … … 279 316 * 280 317 * @returns Strict VBox status code. Informational status codes other than the one documented 281 * here are to be treated as internal failure. 282 * @retval VINF_SUCCESS Success. 283 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 318 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 319 * @retval VINF_SUCCESS Success. 320 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 321 * status code must be passed on to EM. 284 322 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 285 323 * … … 295 333 * 296 334 * @returns Strict VBox status code. Informational status codes other than the one documented 297 * here are to be treated as internal failure. 298 * @retval VINF_SUCCESS Success. 299 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 335 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 336 * @retval VINF_SUCCESS Success. 337 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 338 * status code must be passed on to EM. 300 339 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 301 340 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) … … 313 352 * 314 353 * @returns Strict VBox status code. Informational status codes other than the one documented 315 * here are to be treated as internal failure. 316 * @retval VINF_SUCCESS Success. 317 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 354 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 355 * @retval VINF_SUCCESS Success. 356 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 357 * status code must be passed on to EM. 318 358 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 319 359 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) … … 332 372 * 333 373 * @returns Strict VBox status code. Informational status codes other than the one documented 334 * here are to be treated as internal failure. 335 * @retval VINF_SUCCESS Success. 336 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 374 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 375 * @retval VINF_SUCCESS Success. 376 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 377 * status code must be passed on to EM. 337 378 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 338 379 * … … 367 408 * 368 409 * @returns Strict VBox status code. Informational status codes other than the one documented 410 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 411 * @retval VINF_SUCCESS Success. 412 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 413 * status code must be passed on to EM. 414 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 415 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) 416 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 417 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 418 * 419 * @param pVM The virtual machine (GC pointer ofcourse). 420 * @param pRegFrame Pointer to CPUMCTXCORE guest registers structure. 421 * @param pCpu Disassembler CPU state. 422 */ 423 IOMDECL(int) IOMInterpretINS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu); 424 425 /** 426 * [REP*] INSB/INSW/INSD 427 * ES:EDI,DX[,ECX] 428 * 429 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 430 * 431 * @returns Strict VBox status code. Informational status codes other than the one documented 369 432 * here are to be treated as internal failure. 370 433 * @retval VINF_SUCCESS Success. … … 375 438 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 376 439 * 377 * @param pVM The virtual machine (GC pointer ofcourse).378 * @param pRegFrame Pointer to CPUMCTXCORE guest registers structure.379 * @param pCpu Disassembler CPU state.380 */381 IOMDECL(int) IOMInterpretINS(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu);382 383 /**384 * [REP*] INSB/INSW/INSD385 * ES:EDI,DX[,ECX]386 *387 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess)388 *389 * @returns Strict VBox status code. Informational status codes other than the one documented390 * here are to be treated as internal failure.391 * @retval VINF_SUCCESS Success.392 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM.393 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only)394 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr)395 * @retval VINF_TRPM_XCPT_DISPATCHED The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr)396 * @retval VINF_EM_RESCHEDULE_REM The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr)397 *398 440 * @param pVM The virtual machine (GC pointer ofcourse). 399 441 * @param pRegFrame Pointer to CPUMCTXCORE guest registers structure. … … 409 451 * 410 452 * @returns Strict VBox status code. Informational status codes other than the one documented 411 * here are to be treated as internal failure. 412 * @retval VINF_SUCCESS Success. 413 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 453 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 454 * @retval VINF_SUCCESS Success. 455 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 456 * status code must be passed on to EM. 414 457 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 415 458 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) … … 430 473 * 431 474 * @returns Strict VBox status code. Informational status codes other than the one documented 432 * here are to be treated as internal failure. 433 * @retval VINF_SUCCESS Success. 434 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 475 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 476 * @retval VINF_SUCCESS Success. 477 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 478 * status code must be passed on to EM. 435 479 * @retval VINF_IOM_HC_IOPORT_WRITE Defer the write to ring-3. (R0/GC only) 436 480 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr) … … 510 554 * 511 555 * @returns Strict VBox status code. Informational status codes other than the one documented 512 * here are to be treated as internal failure. 513 * @retval VINF_SUCCESS Success. 514 * @retval VINF_EM_FIRST-VINF_EM_LAST Success but schedulinging information needs to be passed onto EM. 556 * here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 557 * @retval VINF_SUCCESS Success. 558 * @retval VINF_EM_FIRST-VINF_EM_LAST Success with some exceptions (see IOM_SUCCESS()), the 559 * status code must be passed on to EM. 515 560 * @retval VINF_IOM_HC_IOPORT_READ Defer the read to ring-3. (R0/GC only) 516 561 * @retval VINF_EM_RAW_GUEST_TRAP The exception was left pending. (TRPMRaiseXcptErr)
Note:
See TracChangeset
for help on using the changeset viewer.