Changeset 92547 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Nov 22, 2021 12:14:41 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r92541 r92547 1858 1858 PPGMPTWALKGST pGstWalk) 1859 1859 { 1860 AssertPtr(pWalk); 1861 AssertPtr(pGstWalk); 1860 1862 switch (enmSlatMode) 1861 1863 { … … 2400 2402 * Remap the CR3 content and adjust the monitoring if CR3 was actually changed. 2401 2403 */ 2404 RTGCPHYS const GCPhysOldCR3 = pVCpu->pgm.s.GCPhysCR3; 2405 RTGCPHYS GCPhysCR3 = pgmGetGuestMaskedCr3(pVCpu, cr3); 2406 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 2407 if ( !fPdpesMapped 2408 && CPUMIsGuestVmxEptPagingEnabled(pVCpu)) 2409 { 2410 PGMPTWALK Walk; 2411 PGMPTWALKGST GstWalk; 2412 int const rc = pgmGstSlatWalkPhys(pVCpu, PGMSLAT_EPT, GCPhysCR3, &Walk, &GstWalk); 2413 if (RT_SUCCESS(rc)) 2414 GCPhysCR3 = Walk.GCPhys; 2415 else 2416 { 2417 AssertMsgFailed(("Failed to load CR3 at %#RX64. rc=%Rrc\n", GCPhysCR3, rc)); 2418 return rc; 2419 } 2420 } 2421 #endif 2402 2422 int rc = VINF_SUCCESS; 2403 RTGCPHYS const GCPhysOldCR3 = pVCpu->pgm.s.GCPhysCR3;2404 RTGCPHYS const GCPhysCR3 = pgmGetGuestMaskedCr3(pVCpu, cr3);2405 2423 if (GCPhysOldCR3 != GCPhysCR3) 2406 2424 { … … 2484 2502 * Remap the CR3 content and adjust the monitoring if CR3 was actually changed. 2485 2503 */ 2504 RTGCPHYS GCPhysCR3 = pgmGetGuestMaskedCr3(pVCpu, cr3); 2505 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT 2506 if ( !fPdpesMapped 2507 && CPUMIsGuestVmxEptPagingEnabled(pVCpu)) 2508 { 2509 PGMPTWALK Walk; 2510 PGMPTWALKGST GstWalk; 2511 int const rc = pgmGstSlatWalkPhys(pVCpu, PGMSLAT_EPT, GCPhysCR3, &Walk, &GstWalk); 2512 if (RT_SUCCESS(rc)) 2513 GCPhysCR3 = Walk.GCPhys; 2514 else 2515 { 2516 AssertMsgFailed(("Failed to load CR3 at %#RX64. rc=%Rrc\n", GCPhysCR3, rc)); 2517 return VERR_PGM_PAE_PDPE_RSVD; 2518 } 2519 } 2520 #endif 2486 2521 int rc = VINF_SUCCESS; 2487 RTGCPHYS const GCPhysCR3 = pgmGetGuestMaskedCr3(pVCpu, cr3);2488 2522 if (pVCpu->pgm.s.GCPhysCR3 != GCPhysCR3) 2489 2523 { … … 2723 2757 else 2724 2758 { 2725 /** @todo Raise EPT violation VM-exit. */2726 return VERR_NOT_IMPLEMENTED;2759 AssertMsgFailed(("Failed to load CR3 at %#RX64. rc=%Rrc\n", GCPhysCR3, rc)); 2760 return rc; 2727 2761 } 2728 2762 }
Note:
See TracChangeset
for help on using the changeset viewer.