Changeset 12932 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 2, 2008 11:48:49 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r12902 r12932 197 197 198 198 /** Macro for checking if the guest is using paging. 199 * @param uType PGM_TYPE_* 199 * @param uGstType PGM_TYPE_* 200 * @param uShwType PGM_TYPE_* 200 201 * @remark ASSUMES certain order of the PGM_TYPE_* values. 201 202 */ 202 #define PGM_WITH_PAGING(u Type) ((uType) >= PGM_TYPE_32BIT && (uType) != PGM_TYPE_NESTED && (uType) != PGM_TYPE_EPT)203 #define PGM_WITH_PAGING(uGstType, uShwType) ((uGstType) >= PGM_TYPE_32BIT && (uShwType) != PGM_TYPE_NESTED && (uShwType) != PGM_TYPE_EPT) 203 204 204 205 /** Macro for checking if the guest supports the NX bit. 205 * @param uType PGM_TYPE_* 206 * @param uGstType PGM_TYPE_* 207 * @param uShwType PGM_TYPE_* 206 208 * @remark ASSUMES certain order of the PGM_TYPE_* values. 207 209 */ 208 #define PGM_WITH_NX(u Type) ((uType) >= PGM_TYPE_PAE && (uType) != PGM_TYPE_NESTED && (uType) != PGM_TYPE_EPT)210 #define PGM_WITH_NX(uGstType, uShwType) ((uGstType) >= PGM_TYPE_PAE && (uShwType) != PGM_TYPE_NESTED && (uShwType) != PGM_TYPE_EPT) 209 211 210 212 … … 1382 1384 /** Shw: 64-bit PML4; Gst: 64-bit PML4. */ 1383 1385 PGMPOOLKIND_64BIT_PML4_FOR_64BIT_PML4, 1386 1387 /** Shw: EPT page directory pointer table; Gst: no paging */ 1388 PGMPOOLKIND_EPT_PDPT_FOR_PHYS, 1389 /** Shw: EPT page directory table; Gst: no paging */ 1390 PGMPOOLKIND_EPT_PD_FOR_PHYS, 1391 /** Shw: EPT page table; Gst: no paging */ 1392 PGMPOOLKIND_EPT_PT_FOR_PHYS, 1384 1393 1385 1394 /** Shw: Root 32-bit page directory. */ -
trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp
r12702 r12932 140 140 HWACCMDECL(bool) HWACCMHasPendingIrq(PVM pVM) 141 141 { 142 return pVM->hwaccm.s.Event.fPending;142 return !!pVM->hwaccm.s.Event.fPending; 143 143 } 144 144 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r12894 r12932 37 37 #include <VBox/em.h> 38 38 #include <VBox/hwaccm.h> 39 #include <VBox/hwacc_vmx.h> 39 40 #include "PGMInternal.h" 40 41 #include <VBox/vm.h> … … 227 228 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 228 229 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_REAL(name) 229 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS 230 #include "PGMAllBth.h" 231 #undef BTH_PGMPOOLKIND_PT_FOR_PT 230 #include "PGMAllBth.h" 232 231 #undef PGM_BTH_NAME 233 232 #undef PGM_GST_TYPE … … 238 237 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 239 238 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_PROT(name) 240 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PHYS 241 #include "PGMAllBth.h" 242 #undef BTH_PGMPOOLKIND_PT_FOR_PT 239 #include "PGMAllBth.h" 243 240 #undef PGM_BTH_NAME 244 241 #undef PGM_GST_TYPE … … 249 246 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 250 247 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_32BIT(name) 251 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_32BIT_PT 252 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB 253 #include "PGMAllBth.h" 254 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 255 #undef BTH_PGMPOOLKIND_PT_FOR_PT 248 #include "PGMAllBth.h" 256 249 #undef PGM_BTH_NAME 257 250 #undef PGM_GST_TYPE … … 262 255 #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) 263 256 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_PAE(name) 264 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT 265 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB 266 #include "PGMAllBth.h" 267 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 268 #undef BTH_PGMPOOLKIND_PT_FOR_PT 257 #include "PGMAllBth.h" 269 258 #undef PGM_BTH_NAME 270 259 #undef PGM_GST_TYPE … … 275 264 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 276 265 #define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name) 277 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT 278 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB 279 #include "PGMAllBth.h" 280 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 281 #undef BTH_PGMPOOLKIND_PT_FOR_PT 266 #include "PGMAllBth.h" 282 267 #undef PGM_BTH_NAME 283 268 #undef PGM_GST_TYPE … … 298 283 #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) 299 284 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_REAL(name) 300 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_ PAE_PT_FOR_PHYS285 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS 301 286 #include "PGMAllBth.h" 302 287 #undef BTH_PGMPOOLKIND_PT_FOR_PT … … 309 294 #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) 310 295 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_PROT(name) 311 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_ PAE_PT_FOR_PHYS296 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS 312 297 #include "PGMAllBth.h" 313 298 #undef BTH_PGMPOOLKIND_PT_FOR_PT … … 320 305 #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) 321 306 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_32BIT(name) 322 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_32BIT_PT 323 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_32BIT_4MB 324 #include "PGMAllBth.h" 325 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 307 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS 308 #include "PGMAllBth.h" 326 309 #undef BTH_PGMPOOLKIND_PT_FOR_PT 327 310 #undef PGM_BTH_NAME … … 333 316 #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) 334 317 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_PAE(name) 335 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT 336 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB 337 #include "PGMAllBth.h" 338 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 318 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS 319 #include "PGMAllBth.h" 339 320 #undef BTH_PGMPOOLKIND_PT_FOR_PT 340 321 #undef PGM_BTH_NAME … … 346 327 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) 347 328 #define PGM_BTH_NAME(name) PGM_BTH_NAME_EPT_AMD64(name) 348 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_PAE_PT_FOR_PAE_PT 349 #define BTH_PGMPOOLKIND_PT_FOR_BIG PGMPOOLKIND_PAE_PT_FOR_PAE_2MB 350 #include "PGMAllBth.h" 351 #undef BTH_PGMPOOLKIND_PT_FOR_BIG 329 #define BTH_PGMPOOLKIND_PT_FOR_PT PGMPOOLKIND_EPT_PT_FOR_PHYS 330 #include "PGMAllBth.h" 352 331 #undef BTH_PGMPOOLKIND_PT_FOR_PT 353 332 #undef PGM_BTH_NAME -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r12894 r12932 79 79 { 80 80 #if (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64) \ 81 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 81 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 82 && (PGM_SHW_TYPE != PGM_TYPE_EPT || PGM_GST_TYPE == PGM_TYPE_PROT) 82 83 83 84 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE != PGM_TYPE_PAE … … 97 98 */ 98 99 int rc; 99 # if PGM_WITH_PAGING(PGM_GST_TYPE )100 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 100 101 # if PGM_GST_TYPE == PGM_TYPE_32BIT 101 102 const unsigned iPDSrc = (RTGCUINTPTR)pvFault >> GST_PD_SHIFT; … … 174 175 # endif 175 176 176 # if PGM_WITH_PAGING(PGM_GST_TYPE )177 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 177 178 /* 178 179 * If we successfully correct the write protection fault due to dirty bit … … 192 193 193 194 STAM_COUNTER_INC(&pVM->pgm.s.StatGCTrap0ePD[iPDSrc]); 194 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */195 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 195 196 196 197 /* … … 205 206 * 206 207 */ 207 # if PGM_WITH_PAGING(PGM_GST_TYPE )208 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 208 209 GSTPDE PdeSrc = pPDSrc->a[iPDSrc]; 209 210 # else … … 236 237 } 237 238 238 # if PGM_WITH_PAGING(PGM_GST_TYPE )239 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 239 240 /* 240 241 * Check if this address is within any of our mappings. … … 304 305 STAM_PROFILE_STOP(&pVM->pgm.s.StatMapping, a); 305 306 } /* pgmAreMappingsEnabled(&pVM->pgm.s) */ 306 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */307 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 307 308 308 309 /* … … 318 319 RTGCPHYS GCPhys = NIL_RTGCPHYS; 319 320 320 # if PGM_WITH_PAGING(PGM_GST_TYPE )321 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 321 322 # if PGM_GST_TYPE == PGM_TYPE_AMD64 322 323 bool fBigPagesSupported = true; … … 342 343 /* No paging so the fault address is the physical address */ 343 344 GCPhys = (RTGCPHYS)((RTGCUINTPTR)pvFault & ~PAGE_OFFSET_MASK); 344 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */345 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 345 346 346 347 /* … … 411 412 } 412 413 } 413 # if PGM_WITH_PAGING(PGM_GST_TYPE )414 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 414 415 else 415 416 { … … 502 503 } 503 504 } 504 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */505 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 505 506 506 507 /* … … 543 544 } /* if any kind of handler */ 544 545 545 # if PGM_WITH_PAGING(PGM_GST_TYPE )546 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 546 547 if (uErr & X86_TRAP_PF_P) 547 548 { … … 580 581 } 581 582 } 582 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */583 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 583 584 } 584 585 else … … 623 624 # endif /* LOG_ENABLED */ 624 625 625 # if PGM_WITH_PAGING(PGM_GST_TYPE ) && !defined(IN_RING0)626 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0) 626 627 if (CPUMGetGuestCPL(pVM, pRegFrame) == 0) 627 628 { … … 700 701 } 701 702 } 702 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) && !defined(IN_RING0) */703 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) && !defined(IN_RING0) */ 703 704 rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, (RTGCUINTPTR)pvFault, PGM_SYNC_NR_PAGES, uErr); 704 705 if (VBOX_SUCCESS(rc)) … … 773 774 } 774 775 775 # if PGM_WITH_PAGING(PGM_GST_TYPE )776 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 776 777 # ifdef VBOX_STRICT 777 778 /* … … 802 803 AssertMsgFailed(("PGMGCGetPage rc=%Vrc\n", rc)); 803 804 # endif /* VBOX_STRICT */ 804 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */805 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 805 806 } 806 807 STAM_PROFILE_STOP(&pVM->pgm.s.StatOutOfSync, c); … … 827 828 828 829 829 # if PGM_WITH_PAGING(PGM_GST_TYPE )830 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 830 831 /* 831 832 * Conclusion, this is a guest trap. … … 837 838 /* present, but not a monitored page; perhaps the guest is probing physical memory */ 838 839 return VINF_EM_RAW_EMULATE_INSTR; 839 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */840 # endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 840 841 841 842 … … 866 867 PGM_BTH_DECL(int, InvalidatePage)(PVM pVM, RTGCUINTPTR GCPtrPage) 867 868 { 868 #if PGM_WITH_PAGING(PGM_GST_TYPE ) \869 #if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) \ 869 870 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 870 871 && PGM_SHW_TYPE != PGM_TYPE_EPT … … 1531 1532 && PGM_SHW_TYPE != PGM_TYPE_EPT 1532 1533 1533 # if PGM_WITH_NX(PGM_GST_TYPE )1534 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_SHW_TYPE) 1534 1535 bool fNoExecuteBitValid = !!(CPUMGetGuestEFER(pVM) & MSR_K6_EFER_NXE); 1535 1536 # endif … … 1603 1604 && (PdeSrc.n.u1User == PdeDst.n.u1User) 1604 1605 && (PdeSrc.n.u1Write == PdeDst.n.u1Write || !PdeDst.n.u1Write) 1605 # if PGM_WITH_NX(PGM_GST_TYPE )1606 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_SHW_TYPE) 1606 1607 && (!fNoExecuteBitValid || PdeSrc.n.u1NoExecute == PdeDst.n.u1NoExecute) 1607 1608 # endif … … 1805 1806 1806 1807 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 1807 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 1808 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 1809 && (PGM_SHW_TYPE != PGM_TYPE_EPT || PGM_GST_TYPE == PGM_TYPE_PROT) 1808 1810 1809 1811 # ifdef PGM_SYNC_N_PAGES … … 1828 1830 Assert(pPDDst && pPdptDst); 1829 1831 PdeDst = pPDDst->a[iPDDst]; 1832 # elif PGM_SHW_TYPE == PGM_TYPE_EPT 1833 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 1834 X86PDE PdeDst = pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst]; 1835 AssertFailed(); 1830 1836 # endif 1831 1837 Assert(PdeDst.n.u1Present); … … 1913 1919 1914 1920 1915 #if PGM_WITH_PAGING(PGM_GST_TYPE )1921 #if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 1916 1922 1917 1923 /** … … 1936 1942 bool fBigPagesSupported = !!(CPUMGetGuestCR4(pVM) & X86_CR4_PSE); 1937 1943 # endif 1938 # if PGM_WITH_NX(PGM_GST_TYPE )1944 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_SHW_TYPE) 1939 1945 bool fNoExecuteBitValid = !!(CPUMGetGuestEFER(pVM) & MSR_K6_EFER_NXE); 1940 1946 # endif … … 1996 2002 if ( (uErr & X86_TRAP_PF_RSVD) 1997 2003 || !pPdeSrc->n.u1Present 1998 # if PGM_WITH_NX(PGM_GST_TYPE )2004 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_SHW_TYPE) 1999 2005 || (fNoExecuteBitValid && (uErr & X86_TRAP_PF_ID) && pPdeSrc->n.u1NoExecute) 2000 2006 # endif … … 2059 2065 const GSTPTE PteSrc = *pPteSrc; 2060 2066 if ( !PteSrc.n.u1Present 2061 # if PGM_WITH_NX(PGM_GST_TYPE )2067 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_SHW_TYPE) 2062 2068 || (fNoExecuteBitValid && (uErr & X86_TRAP_PF_ID) && PteSrc.n.u1NoExecute) 2063 2069 # endif … … 2226 2232 } 2227 2233 2228 #endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */2234 #endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 2229 2235 2230 2236 … … 2645 2651 2646 2652 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 2647 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 2653 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 2654 && (PGM_SHW_TYPE != PGM_TYPE_EPT || PGM_GST_TYPE == PGM_TYPE_PROT) 2648 2655 2649 2656 int rc = VINF_SUCCESS; … … 2674 2681 PPGMPOOLPAGE pShwPde = pgmPoolGetPageByHCPhys(pVM, pPdptDst->a[iPdpte].u & X86_PDPE_PG_MASK); 2675 2682 Assert(pShwPde); 2683 # elif PGM_SHW_TYPE == PGM_TYPE_EPT 2684 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 2685 PEPTPD pPDDst = NULL; 2686 2687 AssertFailed(); 2676 2688 # endif 2677 2689 PSHWPDE pPdeDst = &pPDDst->a[iPDDst]; … … 2713 2725 PdeDst.n.u1Present = 1; 2714 2726 PdeDst.n.u1Write = 1; 2727 # if PGM_SHW_TYPE != PGM_TYPE_EPT 2715 2728 PdeDst.n.u1User = 1; 2716 2729 PdeDst.n.u1Accessed = 1; 2730 # endif 2717 2731 *pPdeDst = PdeDst; 2718 2732 … … 2749 2763 */ 2750 2764 int rc = VINF_SUCCESS; 2751 # if PGM_WITH_PAGING(PGM_GST_TYPE )2765 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 2752 2766 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2753 2767 const unsigned iPDSrc = (RTGCUINTPTR)GCPtrPage >> GST_PD_SHIFT; … … 2867 2881 */ 2868 2882 2869 # if PGM_WITH_PAGING(PGM_GST_TYPE )2883 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 2870 2884 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2871 2885 const unsigned iPDSrc = (RTGCUINTPTR)GCPtrPage >> GST_PD_SHIFT; … … 2937 2951 } 2938 2952 2939 # if PGM_WITH_PAGING(PGM_GST_TYPE )2953 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 2940 2954 /* Check for dirty bit fault */ 2941 2955 rc = PGM_BTH_NAME(CheckPageFault)(pVM, uErr, pPdeDst, &pPDSrc->a[iPDSrc], GCPtrPage); … … 2954 2968 PdeSrc.n.u1User = 1; 2955 2969 2956 #endif /* PGM_WITH_PAGING(PGM_GST_TYPE ) */2970 #endif /* PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) */ 2957 2971 Assert(rc != VINF_EM_RAW_GUEST_TRAP); 2958 2972 if (uErr & X86_TRAP_PF_US) -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r11713 r12932 237 237 *pfFlags = (Pte.u & ~GST_PTE_PG_MASK) 238 238 & ((Pde.u & (X86_PTE_RW | X86_PTE_US)) | ~(uint64_t)(X86_PTE_RW | X86_PTE_US)); 239 # if PGM_WITH_NX(PGM_GST_TYPE )239 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_GST_TYPE) 240 240 /* The NX bit is determined by a bitwise OR between the PT and PD */ 241 241 if (fNoExecuteBitValid) … … 255 255 *pfFlags = (Pde.u & ~(GST_PTE_PG_MASK | X86_PTE_PAT)) 256 256 | ((Pde.u & X86_PDE4M_PAT) >> X86_PDE4M_PAT_SHIFT); 257 # if PGM_WITH_NX(PGM_GST_TYPE )257 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_GST_TYPE) 258 258 /* The NX bit is determined by a bitwise OR between the PT and PD */ 259 259 if (fNoExecuteBitValid) -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r12204 r12932 2649 2649 /* GCPhys >> PAGE_SHIFT is the index here */ 2650 2650 break; 2651 case PGMPOOLKIND_64BIT_PDPT_FOR_PHYS: 2652 case PGMPOOLKIND_64BIT_PD_FOR_PHYS: 2653 Assert(pUser->iUserTable < X86_PG_PAE_ENTRIES); 2654 break; 2651 2655 case PGMPOOLKIND_ROOT_NESTED: 2652 2656 Assert(pUser->iUserTable < X86_PG_PAE_ENTRIES); … … 2670 2674 2671 2675 /* 64-bit entries */ 2672 case PGMPOOLKIND_ROOT_PAE_PD:2673 case PGMPOOLKIND_ROOT_PDPT:2674 2676 case PGMPOOLKIND_PAE_PD_FOR_32BIT_PD: 2675 2677 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD: … … 2677 2679 case PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT: 2678 2680 case PGMPOOLKIND_64BIT_PML4_FOR_64BIT_PML4: 2681 case PGMPOOLKIND_64BIT_PDPT_FOR_PHYS: 2682 case PGMPOOLKIND_64BIT_PD_FOR_PHYS: 2683 case PGMPOOLKIND_ROOT_PAE_PD: 2684 case PGMPOOLKIND_ROOT_PDPT: 2679 2685 case PGMPOOLKIND_ROOT_NESTED: 2680 2686 u.pau64[pUser->iUserTable] = 0; -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r12894 r12932 60 60 # define SHW_PT_MASK X86_PT_MASK 61 61 # define SHW_POOL_ROOT_IDX PGMPOOL_IDX_PD 62 #elif PGM_SHW_TYPE == PGM_TYPE_EPT 63 # define SHWPT EPTPT 64 # define PSHWPT PEPTPT 65 # define SHWPTE EPTPTE 66 # define PSHWPTE PEPTPTE 67 # define SHWPD EPTPD 68 # define PSHWPD PEPTPD 69 # define SHWPDE EPTPDE 70 # define PSHWPDE PEPTPDE 71 # define SHW_PDE_PG_MASK EPT_PDE_PG_MASK 72 # define SHW_PD_SHIFT EPT_PD_SHIFT 73 # define SHW_PD_MASK EPT_PD_MASK 74 # define SHW_PTE_PG_MASK EPT_PTE_PG_MASK 75 # define SHW_PT_SHIFT EPT_PT_SHIFT 76 # define SHW_PT_MASK EPT_PT_MASK 77 # define SHW_PDPT_SHIFT EPT_PDPT_SHIFT 78 # define SHW_PDPT_MASK EPT_PDPT_MASK 79 # define SHW_PDPE_PG_MASK EPT_PDPE_PG_MASK 80 # define SHW_TOTAL_PD_ENTRIES (EPT_PG_AMD64_ENTRIES*EPT_PG_AMD64_PDPE_ENTRIES) 81 # define SHW_POOL_ROOT_IDX PGMPOOL_IDX_NESTED_ROOT /* do not use! exception is real mode & protected mode without paging. */ 62 82 #else 63 83 # define SHWPT X86PTPAE … … 211 231 *pfFlags = (Pte.u & ~SHW_PTE_PG_MASK) 212 232 & ((Pde.u & (X86_PTE_RW | X86_PTE_US)) | ~(uint64_t)(X86_PTE_RW | X86_PTE_US)); 213 # if PGM_WITH_NX(PGM_SHW_TYPE )233 # if PGM_WITH_NX(PGM_SHW_TYPE, PGM_SHW_TYPE) 214 234 /* The NX bit is determined by a bitwise OR between the PT and PD */ 215 235 if (fNoExecuteBitValid)
Note:
See TracChangeset
for help on using the changeset viewer.