VirtualBox

Changeset 14346 in vbox


Ignore:
Timestamp:
Nov 19, 2008 11:25:35 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39558
Message:

Implemented check for monitored page accesses, fixing TSS out of sync problem with VA in TLB. Enabled VA in TLB by default in new REM>

Location:
trunk
Files:
6 edited

Legend:

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

    r14301 r14346  
    348348                                                 R3PTRTYPE(const char *) pszDesc);
    349349VMMDECL(int)        PGMHandlerPhysicalModify(PVM pVM, RTGCPHYS GCPhysCurrent, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast);
     350VMMDECL(bool)       PGMHandlerIsAddressMonitored(PVM pVM, RTGCPTR GCPtr);
    350351VMMDECL(int)        PGMHandlerPhysicalDeregister(PVM pVM, RTGCPHYS GCPhys);
    351352VMMDECL(int)        PGMHandlerPhysicalChangeCallbacks(PVM pVM, RTGCPHYS GCPhys,
  • trunk/src/VBox/VMM/PGMHandler.cpp

    r13936 r14346  
    433433
    434434/**
     435 * Check if particular guest's VA is being monitored.
     436 *
     437 * @returns true or false
     438 * @param   pVM             VM handle.
     439 * @param   GCPtr           Virtual address.
     440 */
     441VMMDECL(bool) PGMHandlerIsAddressMonitored(PVM pVM, RTGCPTR GCPtr)
     442{
     443    pgmLock(pVM);
     444    PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrGet(&pVM->pgm.s.pTreesR3->VirtHandlers, GCPtr);
     445    pgmUnlock(pVM);
     446
     447    return pCur != 0;
     448}
     449
     450
     451/**
    435452 * Deregister an access handler for a virtual range.
    436453 *
  • trunk/src/recompiler_new/Makefile.kmk

    r14132 r14346  
    4040#
    4141$(REM_MOD)_DEFS             = IN_REM_R3 REM_INCLUDE_CPU_H
    42 $(REM_MOD)_DEFS            += REM_PHYS_ADDR_IN_TLB
     42#$(REM_MOD)_DEFS            += REM_PHYS_ADDR_IN_TLB
    4343#$(REM_MOD)_DEFS           += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB  # Enables huge amounts of debug logging.
    4444$(REM_MOD)_DEFS.linux      = _GNU_SOURCE
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r14277 r14346  
    14521452}
    14531453
     1454#ifndef REM_PHYS_ADDR_IN_TLB
     1455bool remR3IsMonitored(CPUState *env, RTGCPTR GCPtr)
     1456{
     1457    return PGMHandlerIsAddressMonitored(env->pVM, GCPtr);
     1458}
     1459#endif
    14541460
    14551461/**
  • trunk/src/recompiler_new/exec-all.h

    r14241 r14346  
    385385#  if !defined(REM_PHYS_ADDR_IN_TLB)
    386386target_ulong remR3HCVirt2GCPhys(CPUState *env1, void *addr);
     387bool         remR3IsMonitored(CPUState *env, RTGCPTR GCPtr);
    387388#  endif
    388389# endif
  • trunk/src/recompiler_new/exec.c

    r14277 r14346  
    22012201        }
    22022202    }
     2203
     2204#ifdef VBOX
     2205#  if !defined(REM_PHYS_ADDR_IN_TLB)
     2206    if (remR3IsMonitored(env, vaddr & TARGET_PAGE_MASK))
     2207    {
     2208         address |= TLB_MMIO;
     2209         iotlb = (pd & ~TARGET_PAGE_MASK) + paddr +env->pVM->rem.s.iHandlerMemType;
     2210    }
     2211#  endif
     2212#endif
    22032213
    22042214    index = (vaddr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
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