VirtualBox

vbox的更動 15774 路徑 trunk/src/recompiler_new


忽略:
時間撮記:
2008-12-31 上午10:57:14 (16 年 以前)
作者:
vboxsync
訊息:

REM: fixed situation when REM have to execute code
on monitored pages (and thus FreeBSD guests)

位置:
trunk/src/recompiler_new
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/recompiler_new/VBoxRecompiler.c

    r15761 r15774  
    13131313        return (void *)((uintptr_t)pv | 2);
    13141314    return pv;
    1315     //return (void *)((uintptr_t)pv | 2);
    13161315}
    13171316
     
    29752974 * @param   pTLBEntry   The TLB entry.
    29762975 */
    2977 target_ulong remR3PhysGetPhysicalAddressCode(CPUState *env, target_ulong addr, CPUTLBEntry *pTLBEntry)
     2976target_ulong remR3PhysGetPhysicalAddressCode(CPUState*          env,
     2977                                             target_ulong       addr,
     2978                                             CPUTLBEntry*       pTLBEntry,
     2979                                             target_phys_addr_t ioTLBEntry)
    29782980{
    29792981    PVM pVM = env->pVM;
    2980     if ((pTLBEntry->addr_code & ~TARGET_PAGE_MASK) == pVM->rem.s.iHandlerMemType)
    2981     {
    2982         target_ulong ret = pTLBEntry->addend + addr;
    2983         AssertMsg2("remR3PhysGetPhysicalAddressCode: addr=%RGv addr_code=%RGv addend=%RGp ret=%RGp\n",
    2984                    (RTGCPTR)addr, (RTGCPTR)pTLBEntry->addr_code, (RTGCPHYS)pTLBEntry->addend, ret);
     2982
     2983    if ((ioTLBEntry & ~TARGET_PAGE_MASK) == pVM->rem.s.iHandlerMemType)
     2984    {
     2985        /* If code memory is being monitored, appropriate IOTLB entry will have
     2986           handler IO type, and addend will provide real physical address, no
     2987           matter if we store VA in TLB or not, as handlers are always passed PA */
     2988        target_ulong ret = (ioTLBEntry & TARGET_PAGE_MASK) + addr;
    29852989        return ret;
    29862990    }
    2987     LogRel(("\nTrying to execute code with memory type addr_code=%RGv addend=%RGp at %RGv! (iHandlerMemType=%#x iMMIOMemType=%#x)\n"
     2991    LogRel(("\nTrying to execute code with memory type addr_code=%RGv addend=%RGp at %RGv! (iHandlerMemType=%#x iMMIOMemType=%#x IOTLB=%RGp)\n"
    29882992            "*** handlers\n",
    2989             (RTGCPTR)pTLBEntry->addr_code, (RTGCPHYS)pTLBEntry->addend, (RTGCPTR)addr, pVM->rem.s.iHandlerMemType, pVM->rem.s.iMMIOMemType));
     2993            (RTGCPTR)pTLBEntry->addr_code, (RTGCPHYS)pTLBEntry->addend, (RTGCPTR)addr, pVM->rem.s.iHandlerMemType, pVM->rem.s.iMMIOMemType, (RTGCPHYS)ioTLBEntry));
    29902994    DBGFR3Info(pVM, "handlers", NULL, DBGFR3InfoLogRelHlp());
    29912995    LogRel(("*** mmio\n"));
  • trunk/src/recompiler_new/exec-all.h

    r14969 r15774  
    382382#else
    383383# ifdef VBOX
    384 target_ulong remR3PhysGetPhysicalAddressCode(CPUState *env, target_ulong addr, CPUTLBEntry *pTLBEntry);
     384target_ulong remR3PhysGetPhysicalAddressCode(CPUState *env, target_ulong addr, CPUTLBEntry *pTLBEntry, target_phys_addr_t ioTLBEntry);
    385385#  if !defined(REM_PHYS_ADDR_IN_TLB)
    386386target_ulong remR3HCVirt2GCPhys(CPUState *env1, void *addr);
     
    408408# ifdef VBOX
    409409        /* deal with non-MMIO access handlers. */
    410         return remR3PhysGetPhysicalAddressCode(env1, addr, &env1->tlb_table[mmu_idx][page_index]);
     410        return remR3PhysGetPhysicalAddressCode(env1, addr,
     411                                               &env1->tlb_table[mmu_idx][page_index],
     412                                               env1->iotlb[mmu_idx][page_index]);
    411413# elif defined(TARGET_SPARC) || defined(TARGET_MIPS)
    412414        do_unassigned_access(addr, 0, 1, 0, 4);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette