VirtualBox

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


Ignore:
Timestamp:
Aug 13, 2013 7:10:28 PM (11 years ago)
Author:
vboxsync
Message:

IEM: Set dirty and accessed bits on pages. Initialize output vars before I/O port reads. Clear DR7.GD on #DB.

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

Legend:

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

    r47671 r47707  
    29902990
    29912991
    2992 /** \#DB - 01.  */
     2992/** \#DB - 01.
     2993 * @note This automatically clear DR7.GD.  */
    29932994DECL_NO_INLINE(static, VBOXSTRICTRC) iemRaiseDebugException(PIEMCPU pIemCpu)
    29942995{
    29952996    /** @todo set/clear RF. */
     2997    pIemCpu->CTX_SUFF(pCtx)->dr[7] &= ~X86_DR7_GD;
    29962998    return iemRaiseXcptOrInt(pIemCpu, 0, X86_XCPT_DB, IEM_XCPT_FLAGS_T_CPU_XCPT, 0, 0);
    29972999}
     
    52315233                                     VERR_ACCESS_DENIED);
    52325234        }
     5235    }
     5236
     5237    /*
     5238     * Set the dirty / access flags.
     5239     * ASSUMES this is set when the address is translated rather than on committ...
     5240     */
     5241    /** @todo testcase: check when A and D bits are actually set by the CPU.  */
     5242    uint32_t fAccessedDirty = fAccess & IEM_ACCESS_TYPE_WRITE ? X86_PTE_D | X86_PTE_A : X86_PTE_A;
     5243    if ((fFlags & fAccessedDirty) != fAccessedDirty)
     5244    {
     5245        int rc2 = PGMGstModifyPage(IEMCPU_TO_VMCPU(pIemCpu), GCPtrMem, 1, fAccessedDirty, ~(uint64_t)fAccessedDirty);
     5246        AssertRC(rc2);
    52335247    }
    52345248
     
    84738487#if 0 /* DOS's size-overridden iret to v8086. */
    84748488            || (pOrgCtx->rip == 0x427 && pOrgCtx->cs.Sel == 0xb8)
    8475 #endif
    8476 #if 1 /* Win3.1: port 64 interception in v8086 mofr */
    8477             || (pOrgCtx->rip == 0xe9d6 && pOrgCtx->cs.Sel == 0xf000 && pOrgCtx->eflags.Bits.u1VM
    8478                 && pOrgCtx->tr.u64Base == 0x80049e8c && pOrgCtx->tr.u32Limit == 0x2069)
    84798489#endif
    84808490           )
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h

    r47444 r47707  
    10501050        return rcStrict;
    10511051
    1052     uint32_t        u32Value;
     1052    uint32_t        u32Value = 0;
    10531053    if (!IEM_VERIFICATION_ENABLED(pIemCpu))
    10541054        rcStrict = IOMIOPortRead(pVM, IEMCPU_TO_VMCPU(pIemCpu), pCtx->dx, &u32Value, OP_SIZE / 8);
     
    12171217                return rcStrict;
    12181218
    1219             uint32_t u32Value;
     1219            uint32_t u32Value = 0;
    12201220            if (!IEM_VERIFICATION_ENABLED(pIemCpu))
    12211221                rcStrict = IOMIOPortRead(pVM, pVCpu, u16Port, &u32Value, OP_SIZE / 8);
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