Changeset 73268 in vbox
- Timestamp:
- Jul 20, 2018 2:49:05 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123875
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r73266 r73268 593 593 PGMMODEDATASHW const g_aPgmShadowModeData[PGM_SHADOW_MODE_DATA_ARRAY_SIZE] = 594 594 { 595 { UINT8_MAX, NULL, NULL, NULL, NULL , NULL}, /* 0 */596 { UINT8_MAX, NULL, NULL, NULL, NULL , NULL}, /* PGM_TYPE_REAL */597 { UINT8_MAX, NULL, NULL, NULL, NULL , NULL}, /* PGM_TYPE_PROT */595 { UINT8_MAX, NULL, NULL, NULL, NULL }, /* 0 */ 596 { UINT8_MAX, NULL, NULL, NULL, NULL }, /* PGM_TYPE_REAL */ 597 { UINT8_MAX, NULL, NULL, NULL, NULL }, /* PGM_TYPE_PROT */ 598 598 { 599 599 PGM_TYPE_32BIT, … … 689 689 # define PGMMODEDATABTH_NULL_ENTRY() { UINT32_MAX, UINT32_MAX, NULL, NULL, NULL, NULL, NULL, NULL } 690 690 # define PGMMODEDATABTH_ENTRY(uShwT, uGstT, Nm) \ 691 { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm(Relocate),}691 { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), } 692 692 693 693 #elif defined(IN_RING3) && defined(VBOX_STRICT) 694 694 # define PGMMODEDATABTH_NULL_ENTRY() { UINT32_MAX, UINT32_MAX, NULL, NULL, NULL, NULL, NULL, NULL, NULL } 695 695 # define PGMMODEDATABTH_ENTRY(uShwT, uGstT, Nm) \ 696 { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm( Relocate), Nm(AssertCR3) }696 { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm(AssertCR3) } 697 697 698 698 #else … … 3248 3248 AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnUnmapCR3, VERR_PGM_MODE_IPE); 3249 3249 AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnEnter, VERR_PGM_MODE_IPE); 3250 #ifdef IN_RING33251 AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnRelocate, VERR_PGM_MODE_IPE);3252 #endif3253 3250 #ifdef VBOX_STRICT 3254 3251 AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnAssertCR3, VERR_PGM_MODE_IPE); -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r73261 r73268 740 740 } 741 741 742 743 #ifdef IN_RING3 744 /** 745 * Relocate any GC pointers related to guest mode paging. 746 * 747 * @returns VBox status code. 748 * @param pVCpu The cross context virtual CPU structure. 749 * @param offDelta The relocation offset. 750 */ 751 PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta) 752 { 753 pVCpu->pgm.s.pGst32BitPdRC += offDelta; 754 for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsRC); i++) 755 pVCpu->pgm.s.apGstPaePDsRC[i] += offDelta; 756 pVCpu->pgm.s.pGstPaePdptRC += offDelta; 757 758 return VINF_SUCCESS; 759 } 760 #endif -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r73267 r73268 582 582 } 583 583 584 585 #ifdef IN_RING3 586 /** 587 * Relocate any GC pointers related to shadow mode paging. 588 * 589 * @returns VBox status code. 590 * @param pVCpu The cross context virtual CPU structure. 591 * @param offDelta The relocation offset. 592 */ 593 PGM_SHW_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta) 594 { 595 pVCpu->pgm.s.pShwPageCR3RC += offDelta; 596 return VINF_SUCCESS; 597 } 598 #endif 599 -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r73266 r73268 2601 2601 else 2602 2602 AssertFailed(); 2603 2604 uintptr_t idxBth = pVCpu->pgm.s.idxBothModeData;2605 if ( idxBth < RT_ELEMENTS(g_aPgmBothModeData)2606 && g_aPgmBothModeData[idxBth].pfnRelocate)2607 g_aPgmBothModeData[idxBth].pfnRelocate(pVCpu, offDelta);2608 else2609 AssertFailed();2610 2603 } 2611 2604 -
trunk/src/VBox/VMM/VMMR3/PGMGst.h
r73261 r73268 33 33 34 34 35 /**36 * Relocate any GC pointers related to guest mode paging.37 *38 * @returns VBox status code.39 * @param pVCpu The cross context virtual CPU structure.40 * @param offDelta The relocation offset.41 */42 PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)43 {44 pVCpu->pgm.s.pGst32BitPdRC += offDelta;45 35 46 for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsRC); i++)47 {48 pVCpu->pgm.s.apGstPaePDsRC[i] += offDelta;49 }50 pVCpu->pgm.s.pGstPaePdptRC += offDelta;51 52 return VINF_SUCCESS;53 }54 -
trunk/src/VBox/VMM/VMMR3/PGMShw.h
r73261 r73268 120 120 RT_C_DECLS_END 121 121 122 123 /**124 * Relocate any GC pointers related to shadow mode paging.125 *126 * @returns VBox status code.127 * @param pVCpu The cross context virtual CPU structure.128 * @param offDelta The relocation offset.129 */130 PGM_SHW_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)131 {132 pVCpu->pgm.s.pShwPageCR3RC += offDelta;133 return VINF_SUCCESS;134 }135 -
trunk/src/VBox/VMM/include/PGMInternal.h
r73261 r73268 3158 3158 DECLCALLBACKMEMBER(int, pfnEnter)(PVMCPU pVCpu, bool fIs64BitsPagingMode); 3159 3159 DECLCALLBACKMEMBER(int, pfnExit)(PVMCPU pVCpu); 3160 #ifdef IN_RING3 3160 3161 DECLCALLBACKMEMBER(int, pfnRelocate)(PVMCPU pVCpu, RTGCPTR offDelta); /**< Only in ring-3. */ 3162 #endif 3161 3163 } PGMMODEDATASHW; 3162 3164 … … 3188 3190 DECLCALLBACKMEMBER(int, pfnUnmapCR3)(PVMCPU pVCpu); 3189 3191 DECLCALLBACKMEMBER(int, pfnEnter)(PVMCPU pVCpu, RTGCPHYS GCPhysCR3); 3190 #ifdef IN_RING3 3191 DECLCALLBACKMEMBER(int, pfnRelocate)(PVMCPU pVCpu, RTGCPTR offDelta); 3192 #else 3192 #ifndef IN_RING3 3193 3193 DECLCALLBACKMEMBER(int, pfnTrap0eHandler)(PVMCPU pVCpu, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, bool *pfLockTaken); 3194 3194 #endif
Note:
See TracChangeset
for help on using the changeset viewer.