VirtualBox

Changeset 14241

Show
Ignore:
Timestamp:
11/17/08 10:35:50 (2 months ago)
Author:
vboxsync
Message:

support for virtual addresses in QEMU TLB, not yet functional (be back on that)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r14134 r14241  
    13891389 
    13901390 
     1391#ifndef REM_PHYS_ADDR_IN_TLB 
     1392void* remR3GCPhys2HCVirt(CPUState *env1, target_ulong physAddr) 
     1393{ 
     1394    void* rv = NULL; 
     1395    int rc; 
     1396 
     1397    rc = PGMPhysGCPhys2HCPtr(env1->pVM, (RTGCPHYS)physAddr, 1, &rv); 
     1398    Assert (RT_SUCCESS(rc)); 
     1399 
     1400    return rv; 
     1401} 
     1402 
     1403target_ulong remR3HCVirt2GCPhys(CPUState *env1, void *addr) 
     1404{ 
     1405    RTGCPHYS rv = 0; 
     1406    int rc; 
     1407 
     1408    rc = PGMR3DbgR3Ptr2GCPhys(env1->pVM, (RTR3PTR)addr, &rv); 
     1409    Assert (RT_SUCCESS(rc)); 
     1410 
     1411    return (target_ulong)rv; 
     1412} 
     1413#endif 
     1414 
    13911415/** 
    13921416 * Called from tlb_protect_code in order to write monitor a code page. 
     
    27612785    Assert(!pVM->rem.s.fIgnoreAll); 
    27622786    pVM->rem.s.fIgnoreAll = true; 
    2763  
     2787#ifdef REM_PHYS_ADDR_IN_TLB 
    27642788    cpu_register_physical_memory(GCPhys, cb, GCPhys); 
     2789#else 
     2790    cpu_register_physical_memory(GCPhys, cb, pvRam); 
     2791#endif 
    27652792 
    27662793    Assert(pVM->rem.s.fIgnoreAll); 
  • trunk/src/recompiler_new/exec-all.h

    r13731 r14241  
    384384target_ulong remR3PhysGetPhysicalAddressCode(CPUState *env, target_ulong addr, CPUTLBEntry *pTLBEntry); 
    385385#  if !defined(REM_PHYS_ADDR_IN_TLB) 
    386 target_ulong remR3HCVirt2GCPhys(void *env, void *addr); 
     386target_ulong remR3HCVirt2GCPhys(CPUState *env1, void *addr); 
    387387#  endif 
    388388# endif 
     
    419419    return addr + env1->tlb_table[mmu_idx][page_index].addend; 
    420420# elif defined(VBOX) 
    421     return remR3HCVirt2GCPhys(env, (void *)(addr + env1->tlb_table[mmu_idx][page_index].addend)); 
     421    return remR3HCVirt2GCPhys(env1, (void *)(addr + env1->tlb_table[mmu_idx][page_index].addend)); 
    422422# else 
    423423    return addr + env1->tlb_table[mmu_idx][page_index].addend - (unsigned long)phys_ram_base; 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy