VirtualBox

Changeset 49914 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2013 8:03:06 PM (11 years ago)
Author:
vboxsync
Message:

SELM: Fixed stale selector handling issue (raw-mode only). Returning VINF_EM_RESCHEDULE_REM isn't OK for PATM should the GDT write monitoring trigger in patch code. Using VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT instead gives the PATM related code in TRPM and EM a chance to clean up before trying IEM and REM. (Seen booting Ubuntu 8.04 live CD.)

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRC/SELMRC.cpp

    r48936 r49914  
    149149                    paSReg[iSReg].fFlags |= CPUMSELREG_FLAGS_STALE;
    150150                    VMCPU_FF_SET(pVCpu, VMCPU_FF_TO_R3); /* paranoia */
    151                     rcStrict = VINF_EM_RESCHEDULE_REM;
     151                    /* rcStrict = VINF_EM_RESCHEDULE_REM; - bad idea if we're in a patch. */
     152                    rcStrict = VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT;
    152153                }
    153154                else if (paSReg[iSReg].fFlags & CPUMSELREG_FLAGS_STALE)
     
    288289                if (rc2 == VINF_SUCCESS || rc2 == VINF_EM_RESCHEDULE_REM)
    289290                {
     291                    /* VINF_EM_RESCHEDULE_REM - bad idea if we're in a patch. */
     292                    if (rc2 == VINF_EM_RESCHEDULE_REM)
     293                        rc = VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT;
    290294                    STAM_COUNTER_INC(&pVM->selm.s.StatRCWriteGuestGDTHandled);
    291295                    return rc;
  • trunk/src/VBox/VMM/include/SELMInline.h

    r46168 r49914  
    253253    if (pSReg->u64Base != X86DESC_BASE(pShwDesc))
    254254    {
    255         Log(("selmIsSRegStale32: base changed (%#llx -> %#llx)\n", pSReg->u64Base, X86DESC_BASE(pShwDesc)));
     255        Log(("selmIsSRegStale32: base changed (%#llx -> %#x)\n", pSReg->u64Base, X86DESC_BASE(pShwDesc)));
    256256        return true;
    257257    }
Note: See TracChangeset for help on using the changeset viewer.

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