VirtualBox

Changeset 3184

Show
Ignore:
Timestamp:
06/20/07 15:40:16 (2 years ago)
Author:
vboxsync
Message:

return VINF_EM_RAW_EMULATE_INSTR instead of VINF_EM_RESCHEDULE_REM when the emulation of string I/O encounters difficult bits.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/VBox/iom.h

    r3145 r3184  
    4343/** 
    4444 * 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  
     45 * 
     46 * This macro shall only be used with the IOM APIs where it's mentioned 
    4747 * in the return value description. And there is must be used to correctly 
    4848 * determin if the call succeeded and things like the EIP needs updating. 
    49  *  
    50  *  
     49 * 
     50 * 
    5151 * @returns Success indicator (true/false). 
    52  *  
     52 * 
    5353 * @param   rc          The status code. This may be evaluated 
    5454 *                      more than once! 
    55  *  
     55 * 
    5656 * @remark  To avoid making assumptions about the layout of the 
    5757 *          VINF_EM_FIRST...VINF_EM_LAST range we're checking 
     
    6262 *          VINF_EM_RESCHEDULE_REM status code is the most 
    6363 *          frequent status code we'll enounter in this range. 
    64  *  
     64 * 
    6565 * @todo    Will have to add VINF_EM_DBG_HYPER_BREAKPOINT if the 
    6666 *          I/O port and MMIO breakpoints should trigger before 
     
    298298 * Reads an I/O port register. 
    299299 * 
    300  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     300 * @returns Strict VBox status code. Informational status codes other than the one documented 
     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 
    304304 *                                      status code must be passed on to EM. 
    305305 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     
    315315 * Writes to an I/O port register. 
    316316 * 
    317  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     317 * @returns Strict VBox status code. Informational status codes other than the one documented 
     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 
    321321 *                                      status code must be passed on to EM. 
    322322 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     
    332332 * OUT <DX|imm16>, <AL|AX|EAX> 
    333333 * 
    334  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     334 * @returns Strict VBox status code. Informational status codes other than the one documented 
     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 
    338338 *                                      status code must be passed on to EM. 
    339339 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     
    351351 * IN <AL|AX|EAX>, <DX|imm16> 
    352352 * 
    353  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     353 * @returns Strict VBox status code. Informational status codes other than the one documented 
     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 
    357357 *                                      status code must be passed on to EM. 
    358358 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     
    371371 * Reads the string buffer of an I/O port register. 
    372372 * 
    373  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     373 * @returns Strict VBox status code. Informational status codes other than the one documented 
     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 
    377377 *                                      status code must be passed on to EM. 
    378378 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     
    389389 * Writes the string buffer of an I/O port register. 
    390390 * 
    391  * @returns Strict VBox status code. Informational status codes other than the one documented  
     391 * @returns Strict VBox status code. Informational status codes other than the one documented 
    392392 *          here are to be treated as internal failure. 
    393393 * @retval  VINF_SUCCESS                Success. 
    394394 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success but schedulinging information needs to be passed onto EM. 
    395395 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
    396  *  
     396 * 
    397397 * @param   pVM         VM handle. 
    398398 * @param   Port        The port to write. 
     
    407407 * ES:EDI,DX[,ECX] 
    408408 * 
    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  
     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 
    413413 *                                      status code must be passed on to EM. 
    414414 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     415 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM. 
    415416 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    416417 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    429430 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 
    430431 * 
    431  * @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. 
     432 * @returns Strict VBox status code. Informational status codes other than the one documented 
     433 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
     434 * @retval  VINF_SUCCESS                Success. 
     435 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
     436 *                                      status code must be passed on to EM. 
    435437 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     438 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM. 
    436439 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    437440 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    450453 * DS:ESI,DX[,ECX] 
    451454 * 
    452  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     455 * @returns Strict VBox status code. Informational status codes other than the one documented 
     456 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
     457 * @retval  VINF_SUCCESS                Success. 
     458 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    456459 *                                      status code must be passed on to EM. 
    457460 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     461 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the write to the REM. 
    458462 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    459463 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    472476 * @remark  Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 
    473477 * 
    474  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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 * @returns Strict VBox status code. Informational status codes other than the one documented 
     479 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
     480 * @retval  VINF_SUCCESS                Success. 
     481 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    478482 *                                      status code must be passed on to EM. 
    479483 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     484 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the write to the REM. 
    480485 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    481486 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    526531 * level and I/O bitmap. 
    527532 * 
    528  * @returns Strict VBox status code. Informational status codes other than the one documented  
     533 * @returns Strict VBox status code. Informational status codes other than the one documented 
    529534 *          here are to be treated as internal failure. 
    530535 * @retval  VINF_SUCCESS                Success. 
     
    553558 * trap is a in or out type instruction. (Call it indirectly via EM that is.) 
    554559 * 
    555  * @returns Strict VBox status code. Informational status codes other than the one documented  
    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  
     560 * @returns Strict VBox status code. Informational status codes other than the one documented 
     561 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
     562 * @retval  VINF_SUCCESS                Success. 
     563 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    559564 *                                      status code must be passed on to EM. 
    560565 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
  • trunk/src/VBox/VMM/EM.cpp

    r3145 r3184  
    729729    if (pCtx->eflags.Bits.u1VM) 
    730730        Log(("EMV86: %04X:%08X IF=%d\n", pCtx->cs, pCtx->eip, pCtx->eflags.Bits.u1IF)); 
    731     else  
     731    else 
    732732        Log(("EMR%d: %08X ESP=%08X IF=%d CR0=%x\n", cpl, pCtx->eip, pCtx->esp, pCtx->eflags.Bits.u1IF, pCtx->cr0)); 
    733733#endif 
     
    11191119    } 
    11201120#endif /* LOG_ENABLED */ 
    1121      
     1121 
    11221122    /* 
    11231123     * PATM is making life more interesting. 
     
    12741274    if (VBOX_SUCCESS(rc)) 
    12751275    { 
    1276         rc = VINF_EM_RESCHEDULE_REM
     1276        rc = VINF_EM_RAW_EMULATE_INSTR
    12771277 
    12781278        if (!(Cpu.prefix & (PREFIX_REP | PREFIX_REPNE))) 
     
    13171317        } 
    13181318 
    1319         /*  
     1319        /* 
    13201320         * Handled the I/O return codes. 
    1321          * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.) 
     1321         * (The unhandled cases end up with rc == VINF_EM_RAW_EMULATE_INSTR.) 
    13221322         */ 
    13231323        if (IOM_SUCCESS(rc)) 
     
    13411341            return rc; 
    13421342        } 
    1343         AssertMsg(rc == VINF_EM_RESCHEDULE_REM, ("rc=%Vrc\n", rc)); 
     1343        AssertMsg(rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RESCHEDULE_REM, ("rc=%Vrc\n", rc)); 
    13441344    } 
    13451345    STAM_PROFILE_STOP(&pVM->em.s.StatIOEmu, a); 
     
    14831483            if (pCtx->SysEnter.cs != 0) 
    14841484            { 
    1485                 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),  
     1485                rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 
    14861486                                        SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0); 
    14871487                if (VBOX_SUCCESS(rc)) 
     
    15701570#ifdef LOG_ENABLED 
    15711571        DBGFR3InfoLog(pVM, "cpumguest", "Trap in patch code"); 
    1572         DBGFR3DisasInstrCurrentLog(pVM, "Patch code");  
     1572        DBGFR3DisasInstrCurrentLog(pVM, "Patch code"); 
    15731573 
    15741574        DISCPUSTATE Cpu; 
     
    15761576 
    15771577        rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &Cpu, "Patch code: "); 
    1578         if (    VBOX_SUCCESS(rc)  
     1578        if (    VBOX_SUCCESS(rc) 
    15791579            &&  Cpu.pCurInstr->opcode == OP_IRET) 
    15801580        { 
     
    17341734            && !PATMIsPatchGCAddr(pVM, pCtx->eip)) 
    17351735        { 
    1736             int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),  
     1736            int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 
    17371737                                        SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0); 
    17381738            if (VBOX_SUCCESS(rc)) 
     
    20842084         */ 
    20852085        case VINF_PATM_HC_MMIO_PATCH_READ: 
    2086             rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),  
     2086            rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 
    20872087                                    PATMFL_MMIO_ACCESS | (SELMIsSelector32Bit(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) ? PATMFL_CODE32 : 0)); 
    20882088            if (VBOX_FAILURE(rc)) 
     
    27822782 
    27832783    unsigned uSS = pCtx->ss; 
    2784     if (    pCtx->eflags.Bits.u1VM  
     2784    if (    pCtx->eflags.Bits.u1VM 
    27852785        ||  (uSS & X86_SEL_RPL) == 3) 
    27862786    { 
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r3180 r3184  
    15971597 * @remark Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 
    15981598 * 
    1599  * @returns Strict VBox status code. Informational status codes other than the one documented  
     1599 * @returns Strict VBox status code. Informational status codes other than the one documented 
    16001600 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
    16011601 * @retval  VINF_SUCCESS                Success. 
    1602  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the  
     1602 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    16031603 *                                      status code must be passed on to EM. 
    16041604 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     1605 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM. 
    16051606 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    16061607 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    16251626    if (   (uPrefix & PREFIX_REPNE) 
    16261627        || pRegFrame->eflags.Bits.u1DF) 
    1627         return VINF_EM_RESCHEDULE_REM
     1628        return VINF_EM_RAW_EMULATE_INSTR
    16281629 
    16291630    /* 
     
    16441645    /* Convert destination address es:edi. */ 
    16451646    RTGCPTR GCPtrDst; 
    1646     int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid,  
     1647    int rc = SELMToFlatEx(pVM, pRegFrame->eflags, pRegFrame->es, (RTGCPTR)pRegFrame->edi, &pRegFrame->esHid, 
    16471648                          SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL, 
    16481649                          &GCPtrDst, NULL); 
     
    16501651    { 
    16511652        Log(("INS destination address conversion failed -> fallback, rc=%d\n", rc)); 
    1652         return VINF_EM_RESCHEDULE_REM
     1653        return VINF_EM_RAW_EMULATE_INSTR
    16531654    } 
    16541655 
     
    16611662    { 
    16621663        Log(("INS will generate a trap -> fallback, rc=%d\n", rc)); 
    1663         return VINF_EM_RESCHEDULE_REM
     1664        return VINF_EM_RAW_EMULATE_INSTR
    16641665    } 
    16651666 
     
    17081709 * ES:EDI,DX[,ECX] 
    17091710 * 
    1710  * @returns Strict VBox status code. Informational status codes other than the one documented  
     1711 * @returns Strict VBox status code. Informational status codes other than the one documented 
    17111712 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
    17121713 * @retval  VINF_SUCCESS                Success. 
    1713  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the  
     1714 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    17141715 *                                      status code must be passed on to EM. 
    17151716 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
     1717 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM. 
    17161718 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    17171719 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
     
    17521754 * @remark  Assumes caller checked the access privileges (IOMInterpretCheckPortIOAccess) 
    17531755 * 
    1754  * @returns Strict VBox status code. Informational status codes other than the one documented  
     1756 * @returns Strict VBox status code. Informational status codes other than the one documented 
    17551757 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
    17561758 * @retval  VINF_SUCCESS                Success. 
    1757  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the  
     1759 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    17581760 *                                      status code must be passed on to EM. 
    17591761 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     
    17801782    if (   (uPrefix & (PREFIX_SEG | PREFIX_REPNE)) 
    17811783        || pRegFrame->eflags.Bits.u1DF) 
    1782         return VINF_EM_RESCHEDULE_REM
     1784        return VINF_EM_RAW_EMULATE_INSTR
    17831785 
    17841786    /* 
     
    18041806    { 
    18051807        Log(("OUTS source address conversion failed -> fallback, rc=%Vrc\n", rc)); 
    1806         return VINF_EM_RESCHEDULE_REM
     1808        return VINF_EM_RAW_EMULATE_INSTR
    18071809    } 
    18081810 
     
    18141816    { 
    18151817        Log(("OUTS will generate a trap -> fallback, rc=%Vrc\n", rc)); 
    1816         return VINF_EM_RESCHEDULE_REM
     1818        return VINF_EM_RAW_EMULATE_INSTR
    18171819    } 
    18181820 
     
    18651867 * DS:ESI,DX[,ECX] 
    18661868 * 
    1867  * @returns Strict VBox status code. Informational status codes other than the one documented  
     1869 * @returns Strict VBox status code. Informational status codes other than the one documented 
    18681870 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
    18691871 * @retval  VINF_SUCCESS                Success. 
    1870  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the  
     1872 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    18711873 *                                      status code must be passed on to EM. 
    18721874 * @retval  VINF_IOM_HC_IOPORT_WRITE    Defer the write to ring-3. (R0/GC only) 
     1875 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the write to the REM. 
    18731876 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    18741877 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
  • trunk/src/VBox/VMM/VMMGC/IOMGC.cpp

    r3145 r3184  
    5353 * trap is a in or out type instruction. (Call it indirectly via EM that is.) 
    5454 * 
    55  * @returns Strict VBox status code. Informational status codes other than the one documented  
     55 * @returns Strict VBox status code. Informational status codes other than the one documented 
    5656 *          here are to be treated as internal failure. Use IOM_SUCCESS() to check for success. 
    5757 * @retval  VINF_SUCCESS                Success. 
    58  * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the  
     58 * @retval  VINF_EM_FIRST-VINF_EM_LAST  Success with some exceptions (see IOM_SUCCESS()), the 
    5959 *                                      status code must be passed on to EM. 
     60 * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 
     61 * @retval  VINF_EM_RAW_EMULATE_INSTR   Defer the read to the REM. 
    6062 * @retval  VINF_IOM_HC_IOPORT_READ     Defer the read to ring-3. (R0/GC only) 
    6163 * @retval  VINF_EM_RAW_GUEST_TRAP      The exception was left pending. (TRPMRaiseXcptErr) 
    6264 * @retval  VINF_TRPM_XCPT_DISPATCHED   The exception was raised and dispatched for raw-mode execution. (TRPMRaiseXcptErr) 
    63  * @retval  VINF_EM_RESCHEDULE_REM      The exception was dispatched and cannot be executed in raw-mode. (TRPMRaiseXcptErr) 
    6465 * 
    6566 * @param   pVM         The virtual machine (GC pointer ofcourse). 
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r3172 r3184  
    390390            val |= X86_CR0_NE;  /* always turn on the native mechanism to report FPU errors (old style uses interrupts) */ 
    391391        } 
    392         if (!(val & X86_CR0_CD))             
     392        if (!(val & X86_CR0_CD)) 
    393393            val &= ~X86_CR0_NW;     /* Illegal when cache is turned on. */ 
    394394 
     
    12881288            } 
    12891289        } 
    1290         /*  
     1290        /* 
    12911291         * Handled the I/O return codes. 
    12921292         * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.) 
     
    13101310            Assert(IoExitInfo.n.u1Type == 0); 
    13111311        else 
    1312             AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 
    1313 #endif  
    1314         /* Force instruction emulation and not a reschedule to the recompiler as that will come right back to us */ 
    1315         if (rc == VINF_EM_RESCHEDULE_REM) 
    1316             rc = VINF_IOM_HC_IOPORT_WRITE; 
     1312            AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 
     1313#endif 
    13171314        Log2(("Failed IO at %VGv %x size %d\n", pCtx->eip, IoExitInfo.n.u16Port, uIOSize)); 
    13181315        break; 
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r3172 r3184  
    17271727            } 
    17281728        } 
    1729         /*  
     1729        /* 
    17301730         * Handled the I/O return codes. 
    17311731         * (The unhandled cases end up with rc == VINF_EM_RESCHEDULE_REM.) 
     
    17481748            Assert(fIOWrite); 
    17491749        else 
    1750             AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 
    1751 #endif 
    1752         /* Force instruction emulation and not a reschedule to the recompiler as that will come right back to us */ 
    1753         if (rc == VINF_EM_RESCHEDULE_REM) 
    1754             rc = VINF_IOM_HC_IOPORT_WRITE; 
     1750            AssertMsg(VBOX_FAILURE(rc) || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_EM_RAW_GUEST_TRAP || rc == VINF_TRPM_XCPT_DISPATCHED || rc == VINF_EM_RESCHEDULE_REM, ("%Vrc\n", rc)); 
     1751#endif 
    17551752        break; 
    17561753    } 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy