VirtualBox

Changeset 42725 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Aug 9, 2012 7:03:20 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79934
Message:

IEM: Two NT4SP1 verification/rem kludges and a related @todo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r42704 r42725  
    49514951        return rcStrict;
    49524952
     4953/** @todo Testcase & AMD-V/VT-x verification: Check if CR2 should really be the
     4954 *        last byte. */
    49534955    RTGCPHYS GCPhysSecond;
    49544956    rcStrict = iemMemPageTranslateAndCheckAccess(pIemCpu, GCPtrFirst + (cbMem - 1), fAccess, &GCPhysSecond);
     
    81088110        CHECK_SEL(gs);
    81098111        CHECK_FIELD(cr0);
    8110         CHECK_FIELD(cr2);
     8112        /* Klugde #1: REM fetches code and accross the page boundrary and faults on the next page, while we execute
     8113           the faulting instruction first: 001b:77f61ff3 66 8b 42 02   mov ax, word [edx+002h] (NT4SP1) */
     8114        /* Kludge #2: CR2 differs slightly on cross page boundrary faults, we report the last address of the access
     8115           while REM reports the address of the first byte on the page.  Pending investigation as to which is correct. */
     8116        if (pOrgCtx->cr2 != pDebugCtx->cr2)
     8117        {
     8118            if (pIemCpu->uOldCs == 0x1b && pIemCpu->uOldRip == 0x77f61ff3)
     8119            { /* ignore */ }
     8120            else if (   (pOrgCtx->cr2 & ~(uint64_t)3) == (pDebugCtx->cr2 & ~(uint64_t)3)
     8121                     && (pOrgCtx->cr2 & PAGE_OFFSET_MASK) == 0)
     8122            { /* ignore */ }
     8123            else
     8124                CHECK_FIELD(cr2);
     8125        }
    81118126        CHECK_FIELD(cr3);
    81128127        CHECK_FIELD(cr4);
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