Changeset 17485 in vbox
- Timestamp:
- Mar 6, 2009 4:13:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r17465 r17485 1174 1174 int rc = pgmPhysGetPageAndRangeEx(&pVM->pgm.s, GCPhys, &pPage, &pRam); 1175 1175 if (RT_SUCCESS(rc)) 1176 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, (void **) &pR3Ptr);1176 rc = pgmPhysGCPhys2CCPtrInternal(pVM, pPage, GCPhys, (void **)pR3Ptr); 1177 1177 1178 1178 pgmUnlock(pVM); … … 1936 1936 pVirtPhys = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysGetBestFit(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, 1937 1937 GCPhys, true /* fAbove */); 1938 if (pVirtPhys) 1938 if ( pVirtPhys 1939 && (pVirtPhys->Core.Key >> PAGE_SHIFT) == (GCPhys >> PAGE_SHIFT)) 1939 1940 { 1940 1941 /* ASSUME that pVirtPhys only covers one page. */ 1941 1942 Assert((pVirtPhys->Core.Key >> PAGE_SHIFT) == (pVirtPhys->Core.KeyLast >> PAGE_SHIFT)); 1942 pVirt = (PPGMVIRTHANDLER)((uintptr_t)pVirtPhys + pVirtPhys->offVirtHandler); 1943 iVirtPage = pVirtPhys - &pVirt->aPhysToVirt[0]; Assert(iVirtPage == 0); 1944 offVirtLast = pVirtPhys->Core.KeyLast & PAGE_OFFSET_MASK - (GCPhys & PAGE_OFFSET_MASK); 1943 Assert(pVirtPhys->Core.Key > GCPhys); 1944 1945 pVirt = (PPGMVIRTHANDLER)((uintptr_t)pVirtPhys + pVirtPhys->offVirtHandler); 1946 iVirtPage = pVirtPhys - &pVirt->aPhysToVirt[0]; Assert(iVirtPage == 0); 1947 offVirt = (pVirtPhys->Core.Key & PAGE_OFFSET_MASK) - (GCPhys & PAGE_OFFSET_MASK); 1948 offVirtLast = (pVirtPhys->Core.KeyLast & PAGE_OFFSET_MASK) - (GCPhys & PAGE_OFFSET_MASK); 1945 1949 } 1946 1950 else 1947 1951 { 1948 pVirt = NULL;1949 fMoreVirt = false;1950 offVirt = offVirtLast = PAGE_SIZE;1952 pVirt = NULL; 1953 fMoreVirt = false; 1954 offVirt = offVirtLast = PAGE_SIZE; 1951 1955 } 1952 1956 }
Note:
See TracChangeset
for help on using the changeset viewer.