VirtualBox

Changeset 17292 in vbox


Ignore:
Timestamp:
Mar 3, 2009 3:31:32 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43658
Message:

Updates for forced recompiler execution (not used)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hwaccm.h

    r17246 r17292  
    120120VMMR3DECL(bool) HWACCMR3IsVPIDActive(PVM pVM);
    121121VMMR3DECL(int)  HWACCMR3InjectNMI(PVM pVM);
     122VMMR3DECL(void) HWACCMR3EmulateIoBlock(PVM pVM, PCPUMCTX pCtx);
    122123
    123124/** @} */
  • trunk/src/VBox/VMM/EM.cpp

    r17284 r17292  
    23602360         */
    23612361        case VINF_EM_RAW_EMULATE_IO_BLOCK:
     2362            HWACCMR3EmulateIoBlock(pVM, pCtx);
    23622363            rc = VINF_EM_RESCHEDULE_REM;
    23632364            break;
  • trunk/src/VBox/VMM/HWACCM.cpp

    r17246 r17292  
    11901190
    11911191/**
     1192 * Force execution of the current IO code in the recompiler
     1193 *
     1194 * @param   pVM         The VM to operate on.
     1195 * @param   pCtx        Partial VM execution context
     1196 */
     1197VMMR3DECL(void) HWACCMR3EmulateIoBlock(PVM pVM, PCPUMCTX pCtx)
     1198{
     1199    PVMCPU pVCpu = VMMGetCpu(pVM);
     1200
     1201    Assert(pVM->fHWACCMEnabled);
     1202    pVCpu->hwaccm.s.EmulateIoBlock.fEnabled         = true;
     1203    pVCpu->hwaccm.s.EmulateIoBlock.GCPtrFunctionEsp = pCtx->rsp;
     1204}
     1205
     1206/**
    11921207 * Checks if we can currently use hardware accelerated raw mode.
    11931208 *
     
    11981213VMMR3DECL(bool) HWACCMR3CanExecuteGuest(PVM pVM, PCPUMCTX pCtx)
    11991214{
     1215    PVMCPU pVCpu = VMMGetCpu(pVM);
     1216
    12001217    Assert(pVM->fHWACCMEnabled);
     1218
     1219    if (    RT_UNLIKELY(pVCpu->hwaccm.s.EmulateIoBlock.fEnabled)
     1220        &&  pCtx->rsp < pVCpu->hwaccm.s.EmulateIoBlock.GCPtrFunctionEsp)
     1221        return false;
     1222
     1223    pVCpu->hwaccm.s.EmulateIoBlock.fEnabled = false;
    12011224
    12021225    /* AMD SVM supports real & protected mode with or without paging. */
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r15962 r17292  
    549549        uint64_t                    intInfo;
    550550    } Event;
     551
     552    /** IO Block emulation state. */
     553    struct
     554    {
     555        bool                    fEnabled;
     556        uint8_t                 u8Align[7];
     557
     558        /** Esp at the start of the io code we wish to emulate in the recompiler. */
     559        RTGCPTR                 GCPtrFunctionEsp;
     560    } EmulateIoBlock;
    551561
    552562    /** Currenty shadow paging mode. */
Note: See TracChangeset for help on using the changeset viewer.

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