Changeset 12894 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 2, 2008 8:02:05 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r12798 r12894 518 518 LogRel(("HWACCM: MSR bitmap physaddr = %VHp\n", pVM->hwaccm.s.vmx.pMSRBitmapPhys)); 519 519 520 #ifdef HWACCM_VTX_WITH_EPT 521 if (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_EPT) 522 pVM->hwaccm.s.fNestedPaging = pVM->hwaccm.s.fAllowNestedPaging; 523 #endif 524 520 525 /* Only try once. */ 521 526 pVM->hwaccm.s.fInitialized = true; … … 553 558 #endif 554 559 LogRel(("HWACCM: VMX enabled!\n")); 560 if (pVM->hwaccm.s.fNestedPaging) 561 LogRel(("HWACCM: Enabled nested paging\n")); 555 562 } 556 563 else -
trunk/src/VBox/VMM/PGM.cpp
r12793 r12894 985 985 #undef PGM_SHW_NAME_R0_STR 986 986 987 988 #ifdef PGM_WITH_EPT989 987 /* 990 988 * Shadow - EPT … … 1101 1099 #undef PGM_SHW_NAME_GC_STR 1102 1100 #undef PGM_SHW_NAME_R0_STR 1103 #endif /* PGM_WITH_EPT */1104 1101 1105 1102 /** … … 2811 2808 } 2812 2809 2813 #ifdef PGM_WITH_EPT2814 2810 /* Extended paging (EPT) / Intel VT-x */ 2815 2811 pModeData = &pVM->pgm.s.paModeData[pgmModeDataIndex(PGM_TYPE_EPT, PGM_TYPE_REAL)]; … … 2847 2843 rc = PGM_GST_NAME_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc); 2848 2844 rc = PGM_BTH_NAME_EPT_AMD64(InitData)( pVM, pModeData, fResolveGCAndR0); AssertRCReturn(rc, rc); 2849 #endif /* PGM_WITH_EPT */2850 2845 return VINF_SUCCESS; 2851 2846 } … … 3222 3217 rc = PGM_SHW_NAME_NESTED(Enter)(pVM); 3223 3218 break; 3224 #ifdef PGM_WITH_EPT3225 3219 case PGMMODE_EPT: 3226 3220 rc = PGM_SHW_NAME_EPT(Enter)(pVM); 3227 3221 break; 3228 #endif3229 3222 case PGMMODE_REAL: 3230 3223 case PGMMODE_PROTECTED: … … 3280 3273 rc2 = PGM_BTH_NAME_NESTED_REAL(Enter)(pVM, NIL_RTGCPHYS); 3281 3274 break; 3282 #ifdef PGM_WITH_EPT3283 3275 case PGMMODE_EPT: 3284 3276 rc2 = PGM_BTH_NAME_EPT_REAL(Enter)(pVM, NIL_RTGCPHYS); 3285 3277 break; 3286 #endif3287 3278 case PGMMODE_AMD64: 3288 3279 case PGMMODE_AMD64_NX: … … 3306 3297 rc2 = PGM_BTH_NAME_NESTED_PROT(Enter)(pVM, NIL_RTGCPHYS); 3307 3298 break; 3308 #ifdef PGM_WITH_EPT3309 3299 case PGMMODE_EPT: 3310 3300 rc2 = PGM_BTH_NAME_EPT_PROT(Enter)(pVM, NIL_RTGCPHYS); 3311 3301 break; 3312 #endif3313 3302 case PGMMODE_AMD64: 3314 3303 case PGMMODE_AMD64_NX: … … 3333 3322 rc2 = PGM_BTH_NAME_NESTED_32BIT(Enter)(pVM, GCPhysCR3); 3334 3323 break; 3335 #ifdef PGM_WITH_EPT3336 3324 case PGMMODE_EPT: 3337 3325 rc2 = PGM_BTH_NAME_EPT_32BIT(Enter)(pVM, GCPhysCR3); 3338 3326 break; 3339 #endif3340 3327 case PGMMODE_AMD64: 3341 3328 case PGMMODE_AMD64_NX: … … 3373 3360 rc2 = PGM_BTH_NAME_NESTED_PAE(Enter)(pVM, GCPhysCR3); 3374 3361 break; 3375 #ifdef PGM_WITH_EPT3376 3362 case PGMMODE_EPT: 3377 3363 rc2 = PGM_BTH_NAME_EPT_PAE(Enter)(pVM, GCPhysCR3); 3378 3364 break; 3379 #endif3380 3365 case PGMMODE_32_BIT: 3381 3366 case PGMMODE_AMD64: … … 3400 3385 rc2 = PGM_BTH_NAME_NESTED_AMD64(Enter)(pVM, GCPhysCR3); 3401 3386 break; 3402 #ifdef PGM_WITH_EPT3403 3387 case PGMMODE_EPT: 3404 3388 rc2 = PGM_BTH_NAME_EPT_AMD64(Enter)(pVM, GCPhysCR3); 3405 3389 break; 3406 #endif3407 3390 case PGMMODE_32_BIT: 3408 3391 case PGMMODE_PAE: -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r11477 r12894 287 287 #undef PGM_SHW_NAME 288 288 289 290 #ifdef PGM_WITH_EPT291 289 /* 292 290 * Shadow - EPT … … 359 357 #undef PGM_SHW_TYPE 360 358 #undef PGM_SHW_NAME 361 #endif /* PGM_WITH_EPT */362 359 363 360 #endif -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r12129 r12894 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 && PGM_SHW_TYPE != PGM_TYPE_NESTED 46 #if PGM_GST_TYPE == PGM_TYPE_PAE && PGM_SHW_TYPE != PGM_TYPE_PAE && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 47 47 # error "Invalid combination; PAE guest implies PAE shadow" 48 48 #endif … … 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 81 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 82 82 83 83 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE != PGM_TYPE_PAE … … 866 866 PGM_BTH_DECL(int, InvalidatePage)(PVM pVM, RTGCUINTPTR GCPtrPage) 867 867 { 868 #if PGM_WITH_PAGING(PGM_GST_TYPE) \ 869 && PGM_SHW_TYPE != PGM_TYPE_NESTED 868 #if PGM_WITH_PAGING(PGM_GST_TYPE) \ 869 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 870 && PGM_SHW_TYPE != PGM_TYPE_EPT 870 871 int rc; 871 872 … … 1524 1525 LogFlow(("SyncPage: GCPtrPage=%VGv cPages=%d uErr=%#x\n", GCPtrPage, cPages, uErr)); 1525 1526 1526 #if ( PGM_GST_TYPE == PGM_TYPE_32BIT \1527 || PGM_GST_TYPE == PGM_TYPE_PAE \1527 #if ( PGM_GST_TYPE == PGM_TYPE_32BIT \ 1528 || PGM_GST_TYPE == PGM_TYPE_PAE \ 1528 1529 || PGM_GST_TYPE == PGM_TYPE_AMD64) \ 1529 && PGM_SHW_TYPE != PGM_TYPE_NESTED 1530 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 1531 && PGM_SHW_TYPE != PGM_TYPE_EPT 1530 1532 1531 1533 # if PGM_WITH_NX(PGM_GST_TYPE) … … 1803 1805 1804 1806 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 1805 && PGM_SHW_TYPE != PGM_TYPE_NESTED 1807 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 1806 1808 1807 1809 # ifdef PGM_SYNC_N_PAGES … … 2249 2251 || PGM_GST_TYPE == PGM_TYPE_PAE \ 2250 2252 || PGM_GST_TYPE == PGM_TYPE_AMD64) \ 2251 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2253 && PGM_SHW_TYPE != PGM_TYPE_NESTED \ 2254 && PGM_SHW_TYPE != PGM_TYPE_EPT 2252 2255 2253 2256 int rc = VINF_SUCCESS; … … 2642 2645 2643 2646 #elif (PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT) \ 2644 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2647 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 2645 2648 2646 2649 int rc = VINF_SUCCESS; … … 2740 2743 { 2741 2744 #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) \ 2742 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2745 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 2743 2746 /* 2744 2747 * Check that all Guest levels thru the PDE are present, getting the … … 2825 2828 } 2826 2829 return rc; 2827 #elif PGM_SHW_TYPE == PGM_TYPE_NESTED 2830 #elif PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 2828 2831 return VINF_SUCCESS; /* ignore */ 2829 2832 #endif … … 2847 2850 Assert(!HWACCMIsNestedPagingActive(pVM)); 2848 2851 #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_TYPE_AMD64) \ 2849 && PGM_SHW_TYPE != PGM_TYPE_NESTED 2852 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 2850 2853 2851 2854 # ifndef IN_RING0 … … 3043 3046 fGlobal = true; /* Change this CR3 reload to be a global one. */ 3044 3047 3045 #if PGM_SHW_TYPE != PGM_TYPE_NESTED 3048 #if PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT 3046 3049 /* 3047 3050 * Update page access handlers. … … 3064 3067 #endif 3065 3068 3066 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 3069 #if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 3067 3070 /** @todo check if this is really necessary */ 3068 3071 HWACCMFlushTLB(pVM); … … 3512 3515 return VINF_SUCCESS; 3513 3516 # endif 3514 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */3517 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 3515 3518 } 3516 3519 … … 3555 3558 PGM_BTH_DECL(unsigned, AssertCR3)(PVM pVM, uint64_t cr3, uint64_t cr4, RTGCUINTPTR GCPtr, RTGCUINTPTR cb) 3556 3559 { 3557 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 3560 #if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 3558 3561 return 0; 3559 3562 #else … … 4295 4298 return cErrors; 4296 4299 4297 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */4300 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 4298 4301 } 4299 4302 #endif /* VBOX_STRICT */ -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r11311 r12894 115 115 PGM_SHW_DECL(int, GetPage)(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys) 116 116 { 117 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 117 #if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 118 118 return VERR_PAGE_TABLE_NOT_PRESENT; 119 119 120 #else /* PGM_SHW_TYPE != PGM_TYPE_NESTED */120 #else /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 121 121 /* 122 122 * Get the PDE. … … 222 222 223 223 return VINF_SUCCESS; 224 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */224 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 225 225 } 226 226 … … 242 242 PGM_SHW_DECL(int, ModifyPage)(PVM pVM, RTGCUINTPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask) 243 243 { 244 # if PGM_SHW_TYPE == PGM_TYPE_NESTED 244 # if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT 245 245 return VERR_PAGE_TABLE_NOT_PRESENT; 246 246 247 # else /* PGM_SHW_TYPE != PGM_TYPE_NESTED */247 # else /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 248 248 int rc; 249 249 … … 320 320 } 321 321 } 322 # endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */322 # endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT */ 323 323 } 324 324
Note:
See TracChangeset
for help on using the changeset viewer.