Changeset 92717 in vbox for trunk/src/VBox
- Timestamp:
- Dec 2, 2021 9:43:46 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r92703 r92717 750 750 { 751 751 LogFlow(("PGMR3Init:\n")); 752 bool const fDriverless = SUPR3IsDriverless();753 752 PCFGMNODE pCfgPGM = CFGMR3GetChild(CFGMR3GetRoot(pVM), "/PGM"); 754 753 int rc; … … 760 759 AssertCompile(sizeof(pVM->apCpusR3[0]->pgm.s) <= sizeof(pVM->apCpusR3[0]->pgm.padding)); 761 760 AssertCompileMemberAlignment(PGM, CritSectX, sizeof(uintptr_t)); 761 762 /* 763 * If we're in driveless mode we have to use the simplified memory mode. 764 */ 765 bool const fDriverless = SUPR3IsDriverless(); 766 if (fDriverless) 767 { 768 #ifdef VBOX_WITH_PGM_NEM_MODE 769 if (!pVM->pgm.s.fNemMode) 770 pVM->pgm.s.fNemMode = true; 771 #else 772 return VMR3SetError(pVM->pUVM, VERR_SUP_DRIVERLESS, RT_SRC_POS, 773 "Driverless requires that VBox is built with VBOX_WITH_PGM_NEM_MODE defined"); 774 #endif 775 } 762 776 763 777 /* … … 924 938 { 925 939 pVM->pgm.s.pvZeroPgR0 = MMHyperR3ToR0(pVM, pVM->pgm.s.pvZeroPgR3); 926 pVM->pgm.s.HCPhysZeroPg = MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvZeroPgR3); 927 AssertRelease(pVM->pgm.s.HCPhysZeroPg != NIL_RTHCPHYS || fDriverless); 940 pVM->pgm.s.HCPhysZeroPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvZeroPgR3) 941 : _4G - PAGE_SIZE * 2 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 942 AssertRelease(pVM->pgm.s.HCPhysZeroPg != NIL_RTHCPHYS); 928 943 } 929 944 } … … 939 954 { 940 955 ASMMemFill32(pVM->pgm.s.pvMmioPgR3, PAGE_SIZE, 0xfeedface); 941 pVM->pgm.s.HCPhysMmioPg = MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvMmioPgR3); 942 AssertRelease(pVM->pgm.s.HCPhysMmioPg != NIL_RTHCPHYS || fDriverless); 956 pVM->pgm.s.HCPhysMmioPg = !fDriverless ? MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvMmioPgR3) 957 : _4G - PAGE_SIZE * 3 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */; 958 AssertRelease(pVM->pgm.s.HCPhysMmioPg != NIL_RTHCPHYS); 943 959 pVM->pgm.s.HCPhysInvMmioPg = pVM->pgm.s.HCPhysMmioPg; 944 960 }
Note:
See TracChangeset
for help on using the changeset viewer.