Changeset 9021 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
- Timestamp:
- May 21, 2008 2:38:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r9001 r9021 44 44 45 45 /* Filter out some illegal combinations of guest and shadow paging, so we can remove redundant checks inside functions. */ 46 #if PGM_GST_TYPE == PGM_TYPE_PAE && PGM_SHW_TYPE != PGM_TYPE_PAE 46 #if PGM_GST_TYPE == PGM_TYPE_PAE && PGM_SHW_TYPE != PGM_TYPE_PAE && PGM_SHW_TYPE != PGM_TYPE_NESTED 47 47 # error "Invalid combination; PAE guest implies PAE shadow" 48 48 #endif 49 49 50 50 #if (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 51 && !(PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_PAE || PGM_SHW_TYPE == PGM_TYPE_AMD64 )51 && !(PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_PAE || PGM_SHW_TYPE == PGM_TYPE_AMD64 || PGM_SHW_TYPE == PGM_TYPE_NESTED) 52 52 # error "Invalid combination; real or protected mode without paging implies 32 bits or PAE shadow paging." 53 53 #endif 54 54 55 55 #if (PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE) \ 56 && !(PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_PAE )56 && !(PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_PAE || PGM_SHW_TYPE == PGM_TYPE_NESTED) 57 57 # error "Invalid combination; 32 bits guest paging or PAE implies 32 bits or PAE shadow paging." 58 58 #endif 59 59 60 #if (PGM_GST_TYPE == PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_AMD64 )61 || (PGM_SHW_TYPE == PGM_TYPE_AMD64 && PGM_GST_TYPE != PGM_TYPE_AMD64 )60 #if (PGM_GST_TYPE == PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED) \ 61 || (PGM_SHW_TYPE == PGM_TYPE_AMD64 && PGM_GST_TYPE != PGM_TYPE_AMD64 && PGM_GST_TYPE != PGM_TYPE_PROT) 62 62 # error "Invalid combination; AMD64 guest implies AMD64 shadow and vice versa" 63 63 #endif … … 78 78 PGM_BTH_DECL(int, Trap0eHandler)(PVM pVM, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault) 79 79 { 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 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 81 82 82 83 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE != PGM_TYPE_PAE … … 846 847 PGM_BTH_DECL(int, InvalidatePage)(PVM pVM, RTGCUINTPTR GCPtrPage) 847 848 { 848 #if PGM_GST_TYPE == PGM_TYPE_32BIT \ 849 || PGM_GST_TYPE == PGM_TYPE_PAE \ 850 || PGM_GST_TYPE == PGM_TYPE_AMD64 849 #if PGM_WITH_PAGING(PGM_GST_TYPE) \ 850 && PGM_SHW_TYPE != PGM_TYPE_NESTED 851 851 int rc; 852 852 … … 1418 1418 LogFlow(("SyncPage: GCPtrPage=%VGv cPages=%d uErr=%#x\n", GCPtrPage, cPages, uErr)); 1419 1419 1420 #if PGM_GST_TYPE == PGM_TYPE_32BIT \ 1421 || PGM_GST_TYPE == PGM_TYPE_PAE 1420 #if (PGM_GST_TYPE == PGM_TYPE_32BIT \ 1421 || PGM_GST_TYPE == PGM_TYPE_PAE) \ 1422 && PGM_SHW_TYPE != PGM_TYPE_NESTED 1422 1423 1423 1424 # if PGM_WITH_NX(PGM_GST_TYPE) … … 1660 1661 return VINF_PGM_SYNCPAGE_MODIFIED_PDE; 1661 1662 1662 #elif PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT 1663 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 1664 && PGM_SHW_TYPE != PGM_TYPE_NESTED 1663 1665 1664 1666 # ifdef PGM_SYNC_N_PAGES … … 2091 2093 LogFlow(("SyncPT: GCPtrPage=%VGv\n", GCPtrPage)); 2092 2094 2093 #if PGM_GST_TYPE == PGM_TYPE_32BIT \ 2094 || PGM_GST_TYPE == PGM_TYPE_PAE 2095 #if ( PGM_GST_TYPE == PGM_TYPE_32BIT \ 2096 || PGM_GST_TYPE == PGM_TYPE_PAE) \ 2097 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2095 2098 2096 2099 /* … … 2444 2447 return rc; 2445 2448 2446 #elif PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT 2449 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 2450 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2447 2451 2448 2452 int rc = VINF_SUCCESS; … … 2519 2523 PGM_BTH_DECL(int, PrefetchPage)(PVM pVM, RTGCUINTPTR GCPtrPage) 2520 2524 { 2521 #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_SHW_TYPE != PGM_TYPE_AMD64 2525 Assert(!HWACCMIsNestedPagingActive(pVM)); 2526 #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) \ 2527 && PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2522 2528 /* 2523 2529 * Check that all Guest levels thru the PDE are present, getting the … … 2596 2602 LogFlow(("VerifyAccessSyncPage: GCPtrPage=%VGv fPage=%#x uErr=%#x\n", GCPtrPage, fPage, uErr)); 2597 2603 2598 #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_SHW_TYPE != PGM_TYPE_AMD64 2604 Assert(!HWACCMIsNestedPagingActive(pVM)); 2605 #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) \ 2606 && PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2599 2607 2600 2608 # ifndef IN_RING0 … … 2751 2759 PGM_BTH_DECL(int, SyncCR3)(PVM pVM, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal) 2752 2760 { 2761 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 2762 /* @todo check if this is really necessary */ 2763 HWACCMFlushTLB(pVM); 2764 return VINF_SUCCESS; 2765 #else 2753 2766 if (VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3)) 2754 2767 fGlobal = true; /* Change this CR3 reload to be a global one. */ … … 3111 3124 return VINF_SUCCESS; 3112 3125 3113 # elif PGM_GST_TYPE == PGM_TYPE_AMD643126 # elif PGM_GST_TYPE == PGM_TYPE_AMD64 3114 3127 //# error not implemented 3115 3128 return VERR_INTERNAL_ERROR; 3116 # else /* guest real and protected mode */3129 # else /* guest real and protected mode */ 3117 3130 return VINF_SUCCESS; 3118 #endif 3131 # endif 3132 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 3119 3133 } 3120 3134 … … 3159 3173 PGM_BTH_DECL(unsigned, AssertCR3)(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb) 3160 3174 { 3175 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 3176 return 0; 3177 #else 3161 3178 unsigned cErrors = 0; 3162 3179 … … 3768 3785 #endif 3769 3786 return cErrors; 3787 3788 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 3770 3789 } 3771 3790 #endif /* VBOX_STRICT */
Note:
See TracChangeset
for help on using the changeset viewer.