VirtualBox

Changeset 17532 in vbox


Ignore:
Timestamp:
Mar 8, 2009 3:00:54 AM (16 years ago)
Author:
vboxsync
Message:

VMXR0InjectEvent: Use the PGMPhysSimple[Read|Write]GCPhys functions instead of PGMPhys[Read|Write] since the latter will fail if it hits an access handler with the new phys code and all we don't really care (or believe that will ever happen).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r17528 r17532  
    623623         * (#GP if we try to inject external hardware interrupts)
    624624         * Inject the interrupt or trap directly instead.
     625         *
     626         * ASSUMES no access handlers for the bits we read or write below (should be safe).
    625627         */
    626628        Log(("Manual interrupt/trap '%x' inject (real mode)\n", iGate));
     
    655657        /* Read the selector:offset pair of the interrupt handler. */
    656658        GCPhysHandler = (RTGCPHYS)pCtx->idtr.pIdt + iGate * 4;
     659#ifdef VBOX_WITH_NEW_PHYS_CODE
     660        rc = PGMPhysSimpleReadGCPhys(pVM, &offset, GCPhysHandler,     sizeof(offset)); AssertRC(rc);
     661        rc = PGMPhysSimpleReadGCPhys(pVM, &sel,    GCPhysHandler + 2, sizeof(sel));    AssertRC(rc);
     662#else
    657663        PGMPhysRead(pVM, GCPhysHandler,     &offset, sizeof(offset));
    658664        PGMPhysRead(pVM, GCPhysHandler + 2, &sel,    sizeof(sel));
     665#endif
    659666
    660667        LogFlow(("IDT handler %04X:%04X\n", sel, offset));
     
    664671        pCtx->sp -= 2;
    665672        LogFlow(("ss:sp %04X:%04X eflags=%x\n", pCtx->ss, pCtx->sp, pCtx->eflags.u));
     673#ifdef VBOX_WITH_NEW_PHYS_CODE
     674        rc = PGMPhysSimpleWriteGCPhys(pVM, pCtx->ssHid.u64Base + pCtx->sp, &pCtx->eflags, sizeof(uint16_t)); AssertRC(rc);
     675#else
    666676        PGMPhysWrite(pVM, pCtx->ssHid.u64Base + pCtx->sp, &pCtx->eflags, sizeof(uint16_t));
     677#endif
    667678        pCtx->sp -= 2;
    668679        LogFlow(("ss:sp %04X:%04X cs=%x\n", pCtx->ss, pCtx->sp, pCtx->cs));
     680#ifdef VBOX_WITH_NEW_PHYS_CODE
     681        rc = PGMPhysSimpleWriteGCPhys(pVM, pCtx->ssHid.u64Base + pCtx->sp, &pCtx->cs, sizeof(uint16_t)); AssertRC(rc);
     682#else
    669683        PGMPhysWrite(pVM, pCtx->ssHid.u64Base + pCtx->sp, &pCtx->cs, sizeof(uint16_t));
     684#endif
    670685        pCtx->sp -= 2;
    671686        LogFlow(("ss:sp %04X:%04X ip=%x\n", pCtx->ss, pCtx->sp, ip));
     687#ifdef VBOX_WITH_NEW_PHYS_CODE
     688        rc = PGMPhysSimpleWriteGCPhys(pVM, pCtx->ssHid.u64Base + pCtx->sp, &ip, sizeof(ip)); AssertRC(rc);
     689#else
    672690        PGMPhysWrite(pVM, pCtx->ssHid.u64Base + pCtx->sp, &ip, sizeof(ip));
     691#endif
    673692
    674693        /* Update the CPU state for executing the handler. */
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