- Timestamp:
- May 20, 2008 1:16:09 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r8677 r8952 2468 2468 2469 2469 /** 2470 * Sw tich to different (or relocated in the relocate case) mode data.2470 * Switch to different (or relocated in the relocate case) mode data. 2471 2471 * 2472 2472 * @param pVM The VM handle. -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r8948 r8952 278 278 pVMCB->ctrl.u32InterceptException = HWACCM_SVM_TRAP_MASK; 279 279 if (pVM->hwaccm.s.svm.fNestedPaging) 280 pVMCB->ctrl.u32InterceptException &= ~RT_BIT(14); /* no longer need to intercept pagefaults. */280 pVMCB->ctrl.u32InterceptException &= ~RT_BIT(14); /* no longer need to intercept #PF. */ 281 281 282 282 pVMCB->ctrl.u32InterceptCtrl1 = SVM_CTRL1_INTERCEPT_INTR … … 297 297 | SVM_CTRL1_INTERCEPT_FERR_FREEZE; /* Legacy FPU FERR handling. */ 298 298 ; 299 /* With nested paging we don't care about invlpg anymore. */ 300 if (pVM->hwaccm.s.svm.fNestedPaging) 301 pVMCB->ctrl.u32InterceptCtrl1 &= ~SVM_CTRL1_INTERCEPT_INVLPG; 302 299 303 pVMCB->ctrl.u32InterceptCtrl2 = SVM_CTRL2_INTERCEPT_VMRUN /* required */ 300 304 | SVM_CTRL2_INTERCEPT_VMMCALL … … 590 594 591 595 /* Note: WP is not relevant in nested paging mode as we catch accesses on the (host) physical level. */ 592 /* Note: In nested paging mode the guest is allowed to run with paging disabled; the guest physical to host physical translation is stillactive. */596 /* Note: In nested paging mode the guest is allowed to run with paging disabled; the guest physical to host physical translation will remain active. */ 593 597 if (!pVM->hwaccm.s.svm.fNestedPaging) 594 598 { … … 604 608 { 605 609 /* Save our shadow CR3 register. */ 606 if (!pVM->hwaccm.s.svm.fNestedPaging) 607 pVMCB->guest.u64CR3 = PGMGetHyperCR3(pVM); 610 if (pVM->hwaccm.s.svm.fNestedPaging) 611 { 612 pVMCB->ctrl.u64NestedPagingCR3 = PGMGetHyperCR3(pVM); 613 pVMCB->guest.u64CR3 = pCtx->cr3; 614 } 608 615 else 609 pVMCB->guest.u64CR3 = pCtx->cr3;616 pVMCB->guest.u64CR3 = PGMGetHyperCR3(pVM); 610 617 } 611 618 … … 636 643 return VERR_PGM_UNSUPPORTED_HOST_PAGING_MODE; 637 644 638 default: /* shut up gcc */645 default: /* shut up gcc */ 639 646 AssertFailed(); 640 647 return VERR_PGM_UNSUPPORTED_HOST_PAGING_MODE; … … 1031 1038 SVM_READ_SELREG(GS, gs); 1032 1039 1033 /** @note no reason to sync back the CRx and DRx registers. They can't be changed by the guest. */ 1040 /* Note: no reason to sync back the CRx and DRx registers. They can't be changed by the guest. */ 1041 /* Note: only in the nested paging case can CR3 & CR4 be changed by the guest. */ 1042 if (pVM->hwaccm.s.svm.fNestedPaging) 1043 { 1044 CPUMSetGuestCR3(pVM, pVMCB->guest.u64CR3); 1045 CPUMSetGuestCR4(pVM, pVMCB->guest.u64CR4); 1046 } 1034 1047 1035 1048 /** @note NOW IT'S SAFE FOR LOGGING! */ … … 1335 1348 STAM_COUNTER_INC(&pVM->hwaccm.s.StatExitInvpg); 1336 1349 1350 Assert(!pVM->hwaccm.s.svm.fNestedPaging); 1351 1337 1352 /* Truly a pita. Why can't SVM give the same information as VMX? */ 1338 1353 rc = SVMR0InterpretInvpg(pVM, CPUMCTX2CORE(pCtx), pVMCB->ctrl.TLBCtrl.n.u32ASID); … … 1364 1379 break; 1365 1380 case 3: 1381 Assert(!pVM->hwaccm.s.svm.fNestedPaging); 1366 1382 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR3; 1367 1383 break; 1368 1384 case 4: 1385 Assert(!pVM->hwaccm.s.svm.fNestedPaging); 1369 1386 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR4; 1370 1387 break;
Note:
See TracChangeset
for help on using the changeset viewer.