Changeset 14974 in vbox
- Timestamp:
- Dec 4, 2008 12:45:43 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r14969 r14974 932 932 VMMDECL(int) PGMPhysGCPhys2R3PtrEx(PVM pVM, RTGCPHYS GCPhys, RTGCPTR GCPtr, uint32_t flags, PRTR3PTR pR3Ptr) 933 933 { 934 RTR3PTR va;935 934 int rc; 936 935 937 if (flags & PGMPHYS_TRANSLATION_FLAG_CHECK_PHYS_MONITORED) 936 rc = PGMPhysGCPhys2R3Ptr(pVM, GCPhys, 1, pR3Ptr); 937 938 if (RT_SUCCESS(rc) && (flags & PGMPHYS_TRANSLATION_FLAG_CHECK_PHYS_MONITORED)) 938 939 { 939 940 /* Check if there's a physical handler for PA */ 940 941 if (PGMHandlerPhysicalIsRegistered(pVM, GCPhys)) 941 r eturnVERR_PGM_PHYS_PAGE_RESERVED;942 rc = VERR_PGM_PHYS_PAGE_RESERVED; 942 943 } 943 944 944 if ( flags & PGMPHYS_TRANSLATION_FLAG_CHECK_VIRT_MONITORED)945 if (RT_SUCCESS(rc) && (flags & PGMPHYS_TRANSLATION_FLAG_CHECK_VIRT_MONITORED)) 945 946 { 946 947 /* Check if there's a virtual handler for VA */ 947 948 if (PGMHandlerVirtualIsRegistered(pVM, GCPtr)) 948 r eturnVERR_PGM_PHYS_PAGE_RESERVED;949 rc = VERR_PGM_PHYS_PAGE_RESERVED; 949 950 } 950 951 rc = PGMPhysGCPhys2R3Ptr(pVM, GCPhys, 1, &va);952 953 if (RT_FAILURE(rc))954 return rc;955 956 *pR3Ptr = va;957 951 958 952 return rc; -
trunk/src/recompiler_new/Makefile.kmk
r14971 r14974 70 70 # 71 71 $(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H 72 $(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB72 #$(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB 73 73 $(REM_MOD)_DEFS += VBOX_WITH_NEW_RECOMPILER 74 74 #$(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. -
trunk/src/recompiler_new/VBoxRecompiler.c
r14969 r14974 638 638 } 639 639 else 640 { 641 AssertMsgFailed(("Damn, this shouldn't happen! cpu_exec returned %d while singlestepping\n", rc)); 640 { 642 641 switch (rc) 643 642 { … … 1404 1403 if (rc == VERR_PGM_PHYS_PAGE_RESERVED) 1405 1404 { 1406 return (void*)-1; 1405 rv = (void*)((uintptr_t)rv | 1); 1406 rc = 0; 1407 1407 } 1408 1408 Assert (RT_SUCCESS(rc)); -
trunk/src/recompiler_new/exec.c
r14969 r14974 1972 1972 { 1973 1973 unsigned long addr; 1974 1975 #ifdef VBOX 1976 if (start & 1) 1977 return; 1978 #endif 1974 1979 if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == IO_MEM_RAM) { 1975 1980 addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend; … … 2193 2198 2194 2199 code_address = address; 2200 2201 #ifdef VBOX 2202 # if !defined(REM_PHYS_ADDR_IN_TLB) 2203 if (addend & 0x1) 2204 { 2205 addend &= ~(target_ulong)0x1; 2206 if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_RAM) 2207 { 2208 address |= TLB_MMIO; 2209 iotlb = (pd & ~TARGET_PAGE_MASK) + paddr +env->pVM->rem.s.iHandlerMemType; 2210 } 2211 } 2212 # endif 2213 #endif 2214 2195 2215 /* Make accesses to pages with watchpoints go via the 2196 2216 watchpoint trap routines. */ … … 2203 2223 } 2204 2224 } 2205 2206 #ifdef VBOX2207 # if !defined(REM_PHYS_ADDR_IN_TLB)2208 if (addend == (target_phys_addr_t)-1)2209 {2210 address |= TLB_MMIO;2211 iotlb = (pd & ~TARGET_PAGE_MASK) + paddr +env->pVM->rem.s.iHandlerMemType;2212 }2213 # endif2214 #endif2215 2225 2216 2226 index = (vaddr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
Note:
See TracChangeset
for help on using the changeset viewer.