Changeset 10285 in vbox for trunk/src/VBox
- Timestamp:
- Jul 5, 2008 5:29:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r10283 r10285 1792 1792 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPage); 1793 1793 1794 # if PGM_SHW_TYPE == PGM_TYPE_PAE1795 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */1796 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;1797 # else1798 const unsigned offPTSrc = 0;1799 # endif1800 1801 1794 Assert(cPages == 1 || !(uErr & X86_TRAP_PF_P)); 1802 1795 if (cPages > 1 && !(uErr & X86_TRAP_PF_P)) … … 1821 1814 GSTPTE PteSrc; 1822 1815 1823 RTGCUINTPTR GCPtrCurPage = ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)( GST_PT_MASK << GST_PT_SHIFT)) | ((offPTSrc + iPTDst)<< PAGE_SHIFT);1816 RTGCUINTPTR GCPtrCurPage = ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)(SHW_PT_MASK << SHW_PT_SHIFT)) | (iPTDst << PAGE_SHIFT); 1824 1817 1825 1818 /* Fake the page table entry */ … … 1842 1835 } 1843 1836 else 1844 Log4(("%VGv iPTDst=%x pPTDst->a[iPTDst] %RX64\n", ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)( GST_PT_MASK << GST_PT_SHIFT)) | ((offPTSrc + iPTDst)<< PAGE_SHIFT), iPTDst, pPTDst->a[iPTDst].u));1837 Log4(("%VGv iPTDst=%x pPTDst->a[iPTDst] %RX64\n", ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)(SHW_PT_MASK << SHW_PT_SHIFT)) | (iPTDst << PAGE_SHIFT), iPTDst, pPTDst->a[iPTDst].u)); 1845 1838 } 1846 1839 } … … 1850 1843 GSTPTE PteSrc; 1851 1844 const unsigned iPTDst = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK; 1852 RTGCUINTPTR GCPtrCurPage = ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)( GST_PT_MASK << GST_PT_SHIFT)) | ((offPTSrc + iPTDst)<< PAGE_SHIFT);1845 RTGCUINTPTR GCPtrCurPage = ((RTGCUINTPTR)GCPtrPage & ~(RTGCUINTPTR)(SHW_PT_MASK << SHW_PT_SHIFT)) | (iPTDst << PAGE_SHIFT); 1853 1846 1854 1847 /* Fake the page table entry */ … … 2657 2650 2658 2651 /* Virtual address = physical address */ 2659 GCPhys = GCPtrPage & X86_PAGE_4K_BASE_MASK;2652 GCPhys = GCPtrPage & SHW_PD_MASK; 2660 2653 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 2661 rc = pgmPoolAlloc(pVM, GCPhys , BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx, iPDDst, &pShwPage);2654 rc = pgmPoolAlloc(pVM, GCPhys & ~(RT_BIT_64(SHW_PD_SHIFT) - 1), BTH_PGMPOOLKIND_PT_FOR_PT, pShwPde->idx, iPDDst, &pShwPage); 2662 2655 # else 2663 rc = pgmPoolAlloc(pVM, GCPhys , BTH_PGMPOOLKIND_PT_FOR_PT, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage);2656 rc = pgmPoolAlloc(pVM, GCPhys & ~(RT_BIT_64(SHW_PD_SHIFT) - 1), BTH_PGMPOOLKIND_PT_FOR_PT, SHW_POOL_ROOT_IDX, iPDDst, &pShwPage); 2664 2657 # endif 2665 2658
Note:
See TracChangeset
for help on using the changeset viewer.