Changeset 8536 in vbox
- Timestamp:
- May 2, 2008 4:46:51 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30441
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/x86.h
r8155 r8536 1437 1437 /** Flags whether(=1) or not the page is present. */ 1438 1438 uint32_t u1Present : 1; 1439 /** Chunk of reserved bits. */ 1440 uint32_t u2Reserved : 2; 1441 /** Write Thru flag. If PAT enabled, bit 0 of the index. */ 1442 uint32_t u1WriteThru : 1; 1443 /** Cache disabled flag. If PAT enabled, bit 1 of the index. */ 1444 uint32_t u1CacheDisable : 1; 1445 /** Chunk of reserved bits. */ 1446 uint32_t u4Reserved : 4; 1447 /** Available for use to system software. */ 1448 uint32_t u3Available : 3; 1449 /** Physical Page number of the next level - Low Part. Don't use! */ 1450 uint32_t u20PageNoLow : 20; 1451 /** Physical Page number of the next level - High Part. Don't use! */ 1452 uint32_t u20PageNoHigh : 20; 1453 /** MBZ bits */ 1454 uint32_t u12Reserved : 12; 1455 } X86PDPEBITS; 1456 /** Pointer to a page directory pointer table entry. */ 1457 typedef X86PDPEBITS *PX86PTPEBITS; 1458 /** Pointer to a const page directory pointer table entry. */ 1459 typedef const X86PDPEBITS *PCX86PTPEBITS; 1460 1461 /** 1462 * Page directory pointer table entry. AMD64 version 1463 */ 1464 typedef struct X86PDPEAMD64BITS 1465 { 1466 /** Flags whether(=1) or not the page is present. */ 1467 uint32_t u1Present : 1; 1439 1468 /** Read(=0) / Write(=1) flag. */ 1440 1469 uint32_t u1Write : 1; … … 1460 1489 /** No Execute flag. */ 1461 1490 uint32_t u1NoExecute : 1; 1462 } X86PDPE BITS;1491 } X86PDPEAMD64BITS; 1463 1492 /** Pointer to a page directory pointer table entry. */ 1464 typedef X86PDPE BITS *PX86PTPEBITS;1493 typedef X86PDPEAMD64BITS *PX86PDPEAMD64BITS; 1465 1494 /** Pointer to a const page directory pointer table entry. */ 1466 typedef const X86PDPEBITS *PCX86P TPEBITS;1495 typedef const X86PDPEBITS *PCX86PDPEAMD64BITS; 1467 1496 1468 1497 /** … … 1473 1502 /** Normal view. */ 1474 1503 X86PDPEBITS n; 1504 /** AMD64 view. */ 1505 X86PDPEAMD64BITS lm; 1475 1506 /** Unsigned integer view. */ 1476 1507 X86PGPAEUINT u; -
trunk/src/VBox/VMM/PGM.cpp
r8500 r8536 3172 3172 "%016llx 1 | P %c %c %c %c %c %s %s %s %s .. %c%c%c %016llx\n", 3173 3173 u64Address + ((uint64_t)i << X86_PDPT_SHIFT), 3174 Pdpe. n.u1Write ? 'W' : 'R',3175 Pdpe. n.u1User ? 'U' : 'S',3176 Pdpe. n.u1Accessed ? 'A' : '-',3177 Pdpe. n.u3Reserved & 1? '?' : '.', /* ignored */3178 Pdpe. n.u3Reserved & 4? '!' : '.', /* mbz */3179 Pdpe. n.u1WriteThru ? "WT" : "--",3180 Pdpe. n.u1CacheDisable? "CD" : "--",3181 Pdpe. n.u3Reserved & 2? "!" : "..",/* mbz */3182 Pdpe. n.u1NoExecute ? "NX" : "--",3174 Pdpe.lm.u1Write ? 'W' : 'R', 3175 Pdpe.lm.u1User ? 'U' : 'S', 3176 Pdpe.lm.u1Accessed ? 'A' : '-', 3177 Pdpe.lm.u3Reserved & 1? '?' : '.', /* ignored */ 3178 Pdpe.lm.u3Reserved & 4? '!' : '.', /* mbz */ 3179 Pdpe.lm.u1WriteThru ? "WT" : "--", 3180 Pdpe.lm.u1CacheDisable? "CD" : "--", 3181 Pdpe.lm.u3Reserved & 2? "!" : "..",/* mbz */ 3182 Pdpe.lm.u1NoExecute ? "NX" : "--", 3183 3183 Pdpe.u & RT_BIT(9) ? '1' : '0', 3184 3184 Pdpe.u & PGM_PLXFLAGS_PERMANENT ? 'p' : '-', … … 3186 3186 Pdpe.u & X86_PDPE_PG_MASK); 3187 3187 else 3188 pHlp->pfnPrintf(pHlp, /*P R S A DG WT CD AT NX 4M a p ? */3189 "%08x 0 | P %c %c %c %c%c %s %s %s %s .. %c%c%c %016llx\n",3188 pHlp->pfnPrintf(pHlp, /*P G WT CD AT NX 4M a p ? */ 3189 "%08x 0 | P %c %s %s %s %s .. %c%c%c %016llx\n", 3190 3190 i << X86_PDPT_SHIFT, 3191 Pdpe.n.u1Write ? '!' : '.', /* mbz */ 3192 Pdpe.n.u1User ? '!' : '.', /* mbz */ 3193 Pdpe.n.u1Accessed ? '!' : '.', /* mbz */ 3194 Pdpe.n.u3Reserved & 1? '!' : '.', /* mbz */ 3195 Pdpe.n.u3Reserved & 4? '!' : '.', /* mbz */ 3191 Pdpe.n.u4Reserved & 1? '!' : '.', /* mbz */ 3192 Pdpe.n.u4Reserved & 4? '!' : '.', /* mbz */ 3196 3193 Pdpe.n.u1WriteThru ? "WT" : "--", 3197 3194 Pdpe.n.u1CacheDisable? "CD" : "--", 3198 Pdpe.n.u3Reserved & 2? "!" : "..",/* mbz */ 3199 Pdpe.n.u1NoExecute ? "NX" : "--", 3195 Pdpe.n.u4Reserved & 2? "!" : "..",/* mbz */ 3200 3196 Pdpe.u & RT_BIT(9) ? '1' : '0', 3201 3197 Pdpe.u & PGM_PLXFLAGS_PERMANENT ? 'p' : '-', -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r8535 r8536 1733 1733 || !pPdpeSrc->n.u1Present 1734 1734 # if PGM_GST_TYPE == PGM_TYPE_AMD64 /* NX, r/w, u/s bits in the PDPE are long mode only */ 1735 || (fNoExecuteBitValid && (uErr & X86_TRAP_PF_ID) && pPdpeSrc-> n.u1NoExecute)1736 || (fWriteFault && !pPdpeSrc-> n.u1Write && (fUserLevelFault || fWriteProtect))1737 || (fUserLevelFault && !pPdpeSrc-> n.u1User)1735 || (fNoExecuteBitValid && (uErr & X86_TRAP_PF_ID) && pPdpeSrc->lm.u1NoExecute) 1736 || (fWriteFault && !pPdpeSrc->lm.u1Write && (fUserLevelFault || fWriteProtect)) 1737 || (fUserLevelFault && !pPdpeSrc->lm.u1User) 1738 1738 # endif 1739 1739 ) … … 1766 1766 { 1767 1767 /* Mark guest page directory as accessed */ 1768 pPdeSrc->b.u1Accessed = 1; 1768 # if PGM_GST_TYPE == PGM_TYPE_AMD64 1769 pPml4eSrc->n.u1Accessed = 1; 1770 pPdpeSrc->lm.u1Accessed = 1; 1771 # endif 1772 pPdeSrc->b.u1Accessed = 1; 1769 1773 1770 1774 /* … … 1835 1839 * Set the accessed bits in the page directory and the page table. 1836 1840 */ 1837 pPdeSrc->n.u1Accessed = 1; 1838 pPteSrc->n.u1Accessed = 1; 1841 # if PGM_GST_TYPE == PGM_TYPE_AMD64 1842 pPml4eSrc->n.u1Accessed = 1; 1843 pPdpeSrc->lm.u1Accessed = 1; 1844 # endif 1845 pPdeSrc->n.u1Accessed = 1; 1846 pPteSrc->n.u1Accessed = 1; 1839 1847 1840 1848 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r8458 r8536 181 181 182 182 /* Merge accessed, write, user and no-execute bits into the PDE. */ 183 Pde.n.u1Accessed &= pPml4e->n.u1Accessed & Pdpe. n.u1Accessed;184 Pde.n.u1Write &= pPml4e->n.u1Write & Pdpe. n.u1Write;185 Pde.n.u1User &= pPml4e->n.u1User & Pdpe. n.u1User;186 Pde.n.u1NoExecute &= pPml4e->n.u1NoExecute& Pdpe. n.u1NoExecute;183 Pde.n.u1Accessed &= pPml4e->n.u1Accessed & Pdpe.lm.u1Accessed; 184 Pde.n.u1Write &= pPml4e->n.u1Write & Pdpe.lm.u1Write; 185 Pde.n.u1User &= pPml4e->n.u1User & Pdpe.lm.u1User; 186 Pde.n.u1NoExecute &= pPml4e->n.u1NoExecute& Pdpe.lm.u1NoExecute; 187 187 # endif 188 188
Note:
See TracChangeset
for help on using the changeset viewer.