Changeset 93593 in vbox for trunk/src/VBox
- Timestamp:
- Feb 3, 2022 9:05:05 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149730
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r93554 r93593 1392 1392 AssertMsgReturn(PGM_PAGE_GET_HCPHYS(pPage)== pVM->pgm.s.HCPhysZeroPg, ("pPage=%R[pgmpage]\n", pPage), 1393 1393 VERR_PGM_PHYS_PAGE_MAP_IPE_4); 1394 *ppv = pVM->pgm.s. CTXALLSUFF(pvZeroPg);1394 *ppv = pVM->pgm.s.abZeroPg; 1395 1395 } 1396 1396 else 1397 *ppv = pVM->pgm.s. CTXALLSUFF(pvZeroPg);1397 *ppv = pVM->pgm.s.abZeroPg; 1398 1398 *ppMap = NULL; 1399 1399 return VINF_SUCCESS; … … 1622 1622 pTlbe->pMap = NULL; 1623 1623 # endif 1624 pTlbe->pv = pVM->pgm.s. CTXALLSUFF(pvZeroPg);1624 pTlbe->pv = pVM->pgm.s.abZeroPg; 1625 1625 } 1626 1626 # ifdef PGM_WITH_PHYS_TLB -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r93554 r93593 930 930 931 931 /* 932 * Allocate the zero page. 933 */ 934 if (RT_SUCCESS(rc)) 935 { 936 rc = MMHyperAlloc(pVM, RT_MAX(GUEST_PAGE_SIZE, HOST_PAGE_SIZE), GUEST_PAGE_SIZE, MM_TAG_PGM, &pVM->pgm.s.pvZeroPgR3); 937 if (RT_SUCCESS(rc)) 938 { 939 pVM->pgm.s.pvZeroPgR0 = MMHyperR3ToR0(pVM, pVM->pgm.s.pvZeroPgR3); 940 pVM->pgm.s.HCPhysZeroPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvZeroPgR3) 941 : _4G - GUEST_PAGE_SIZE * 2 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 942 AssertRelease(pVM->pgm.s.HCPhysZeroPg != NIL_RTHCPHYS); 943 } 944 } 945 946 /* 947 * Allocate the invalid MMIO page. 932 * Setup the zero page. 933 */ 934 RT_ZERO(pVM->pgm.s.abZeroPg); 935 pVM->pgm.s.HCPhysZeroPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.abZeroPg) 936 : _4G - GUEST_PAGE_SIZE * 2 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 937 AssertRelease(pVM->pgm.s.HCPhysZeroPg != NIL_RTHCPHYS); 938 939 /* 940 * Setup the invalid MMIO page. 948 941 * (The invalid bits in HCPhysInvMmioPg are set later on init complete.) 949 942 */ 950 if (RT_SUCCESS(rc)) 951 { 952 rc = MMHyperAlloc(pVM, RT_MAX(GUEST_PAGE_SIZE, HOST_PAGE_SIZE), GUEST_PAGE_SIZE, 953 MM_TAG_PGM, &pVM->pgm.s.pvMmioPgR3); 954 if (RT_SUCCESS(rc)) 955 { 956 ASMMemFill32(pVM->pgm.s.pvMmioPgR3, RT_MAX(GUEST_PAGE_SIZE, HOST_PAGE_SIZE), 0xfeedface); 957 pVM->pgm.s.HCPhysMmioPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvMmioPgR3) 958 : _4G - GUEST_PAGE_SIZE * 3 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 959 AssertRelease(pVM->pgm.s.HCPhysMmioPg != NIL_RTHCPHYS); 960 pVM->pgm.s.HCPhysInvMmioPg = pVM->pgm.s.HCPhysMmioPg; 961 } 962 } 943 ASMMemFill32(pVM->pgm.s.abMmioPg, sizeof(pVM->pgm.s.abMmioPg), 0xfeedface); 944 pVM->pgm.s.HCPhysMmioPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.abMmioPg) 945 : _4G - GUEST_PAGE_SIZE * 3 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 946 AssertRelease(pVM->pgm.s.HCPhysMmioPg != NIL_RTHCPHYS); 947 pVM->pgm.s.HCPhysInvMmioPg = pVM->pgm.s.HCPhysMmioPg; 963 948 964 949 /* … … 1773 1758 1774 1759 /* 1775 * The Zero page.1776 */1777 pVM->pgm.s.pvZeroPgR0 = MMHyperR3ToR0(pVM, pVM->pgm.s.pvZeroPgR3);1778 AssertRelease(pVM->pgm.s.pvZeroPgR0 != NIL_RTR0PTR || SUPR3IsDriverless());1779 1780 /*1781 1760 * The page pool. 1782 1761 */ -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r93554 r93593 1427 1427 { 1428 1428 uint8_t u2State = PGM_PAGE_GET_NEM_STATE(pPage); 1429 NEMHCNotifyPhysPageChanged(pVM, GCPhys, HCPhysPrev, pVM->pgm.s.HCPhysZeroPg, pVM->pgm.s. pvZeroPgR3,1429 NEMHCNotifyPhysPageChanged(pVM, GCPhys, HCPhysPrev, pVM->pgm.s.HCPhysZeroPg, pVM->pgm.s.abZeroPg, 1430 1430 pgmPhysPageCalcNemProtection(pPage, enmNewType), enmNewType, &u2State); 1431 1431 PGM_PAGE_SET_NEM_STATE(pPage, u2State); -
trunk/src/VBox/VMM/include/PGMInternal.h
r93554 r93593 2806 2806 typedef struct PGM 2807 2807 { 2808 /** The zero page. */ 2809 uint8_t abZeroPg[RT_MAX(HOST_PAGE_SIZE, GUEST_PAGE_SIZE)]; 2810 /** The MMIO placeholder page. */ 2811 uint8_t abMmioPg[RT_MAX(HOST_PAGE_SIZE, GUEST_PAGE_SIZE)]; 2812 2813 /** @name The zero page (abPagePg). 2814 * @{ */ 2815 /** The host physical address of the zero page. */ 2816 RTHCPHYS HCPhysZeroPg; 2817 /** @}*/ 2818 2819 /** @name The Invalid MMIO page (abMmioPg). 2820 * This page is filled with 0xfeedface. 2821 * @{ */ 2822 /** The host physical address of the invalid MMIO page. */ 2823 RTHCPHYS HCPhysMmioPg; 2824 /** The host pysical address of the invalid MMIO page plus all invalid 2825 * physical address bits set. This is used to trigger X86_TRAP_PF_RSVD. 2826 * @remarks Check fLessThan52PhysicalAddressBits before use. */ 2827 RTHCPHYS HCPhysInvMmioPg; 2828 /** @} */ 2829 2808 2830 /** @cfgm{/RamPreAlloc, boolean, false} 2809 2831 * Indicates whether the base RAM should all be allocated before starting … … 2924 2946 uint32_t cDeprecatedPageLocks; 2925 2947 /** Alignment padding. */ 2926 uint32_t au32Alignment2[1 ];2948 uint32_t au32Alignment2[1+2]; 2927 2949 2928 2950 /** PGM critical section. … … 2960 2982 /** The page mapping TLB for ring-0. */ 2961 2983 PGMPAGER0MAPTLB PhysTlbR0; 2962 2963 /** @name The zero page.2964 * @{ */2965 /** The host physical address of the zero page. */2966 RTHCPHYS HCPhysZeroPg;2967 /** The ring-3 mapping of the zero page. */2968 RTR3PTR pvZeroPgR3;2969 /** The ring-0 mapping of the zero page. */2970 RTR0PTR pvZeroPgR0;2971 /** @}*/2972 2973 /** @name The Invalid MMIO page.2974 * This page is filled with 0xfeedface.2975 * @{ */2976 /** The host physical address of the invalid MMIO page. */2977 RTHCPHYS HCPhysMmioPg;2978 /** The host pysical address of the invalid MMIO page plus all invalid2979 * physical address bits set. This is used to trigger X86_TRAP_PF_RSVD.2980 * @remarks Check fLessThan52PhysicalAddressBits before use. */2981 RTHCPHYS HCPhysInvMmioPg;2982 /** The ring-3 mapping of the invalid MMIO page. */2983 RTR3PTR pvMmioPgR3;2984 #if HC_ARCH_BITS == 322985 RTR3PTR R3PtrAlignment4;2986 #endif2987 /** @} */2988 2989 2984 2990 2985 /** The number of handy pages. */
Note:
See TracChangeset
for help on using the changeset viewer.