Changeset 31080 in vbox
- Timestamp:
- Jul 24, 2010 5:25:32 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r31066 r31080 2345 2345 pgmR3PoolReset(pVM); 2346 2346 2347 /* 2348 * Re-init various other members and clear the FFs that PGM owns. 2349 */ 2347 2350 for (VMCPUID i = 0; i < pVM->cCpus; i++) 2348 2351 { 2349 PVMCPU pVCpu = &pVM->aCpus[i]; 2350 2351 /* 2352 * Re-init other members. 2353 */ 2352 PVMCPU pVCpu = &pVM->aCpus[i]; 2353 2354 2354 pVCpu->pgm.s.fA20Enabled = true; 2355 2356 /* 2357 * Clear the FFs PGM owns. 2358 */ 2355 pVCpu->pgm.s.fGst32BitPageSizeExtension = false; 2356 PGMNotifyNxeChanged(pVCpu, false); 2357 2359 2358 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_PGM_SYNC_CR3); 2360 2359 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL); … … 2362 2361 2363 2362 /* 2364 * Reset (zero) RAM pages.2363 * Reset (zero) RAM and shadow ROM pages. 2365 2364 */ 2366 2365 rc = pgmR3PhysRamReset(pVM); 2367 2366 if (RT_SUCCESS(rc)) 2368 {2369 /*2370 * Reset (zero) shadow ROM pages.2371 */2372 2367 rc = pgmR3PhysRomReset(pVM); 2373 } 2368 2374 2369 2375 2370 pgmUnlock(pVM); -
trunk/src/VBox/VMM/PGMGstDefs.h
r31069 r31080 127 127 //# define GST_IS_BIG_PDPE_VALID(pVCpu, Pdpe) (false) 128 128 //# define GST_IS_PML4E_VALID(pVCpu, Pml4e) (false) 129 # define GST_IS_PSE_ACTIVE(pVCpu) pgmGst IsPageSizeExtActive(pVCpu)129 # define GST_IS_PSE_ACTIVE(pVCpu) pgmGst32BitIsPageSizeExtActive(pVCpu) 130 130 # define GST_IS_NX_ACTIVE(pVCpu) (false) 131 131 # define BTH_IS_NP_ACTIVE(pVM) (false) -
trunk/src/VBox/VMM/PGMInline.h
r31069 r31080 558 558 * Checks if the no-execute (NX) feature is active (EFER.NXE=1). 559 559 * 560 * This is inlined so that we can perform consistency checks in debug builds. 560 * Only used when the guest is in PAE or long mode. This is inlined so that we 561 * can perform consistency checks in debug builds. 561 562 * 562 563 * @returns true if it is, false if it isn't. … … 565 566 DECL_FORCE_INLINE(bool) pgmGstIsNoExecuteActive(PVMCPU pVCpu) 566 567 { 567 /** @todo shadow this variable */ 568 return CPUMIsGuestNXEnabled(pVCpu); 568 Assert(pVCpu->pgm.s.fNoExecuteEnabled == CPUMIsGuestNXEnabled(pVCpu)); 569 Assert(CPUMIsGuestInPAEMode(pVCpu) || CPUMIsGuestInLongMode(pVCpu)); 570 return pVCpu->pgm.s.fNoExecuteEnabled; 569 571 } 570 572 … … 573 575 * Checks if the page size extension (PSE) is currently enabled (CR4.PSE=1). 574 576 * 575 * This is inlined so that we can perform consistency checks in debug builds. 577 * Only used when the guest is in paged 32-bit mode. This is inlined so that 578 * we can perform consistency checks in debug builds. 576 579 * 577 580 * @returns true if it is, false if it isn't. 578 581 * @param pVCpu The current CPU. 579 582 */ 580 DECL_FORCE_INLINE(bool) pgmGstIsPageSizeExtActive(PVMCPU pVCpu) 581 { 582 /** @todo ( (pVCpu)->pgm.s.fGst32BitPageSizeExtension ) */ 583 return CPUMIsGuestPageSizeExtEnabled(pVCpu); 583 DECL_FORCE_INLINE(bool) pgmGst32BitIsPageSizeExtActive(PVMCPU pVCpu) 584 { 585 Assert(pVCpu->pgm.s.fGst32BitPageSizeExtension == CPUMIsGuestPageSizeExtEnabled(pVCpu)); 586 Assert(!CPUMIsGuestInPAEMode(pVCpu)); 587 Assert(!CPUMIsGuestInLongMode(pVCpu)); 588 return pVCpu->pgm.s.fGst32BitPageSizeExtension; 584 589 } 585 590 -
trunk/src/VBox/VMM/PGMInternal.h
r31066 r31080 3119 3119 /** A20 gate state - boolean! */ 3120 3120 bool fA20Enabled; 3121 /** Mirror of the EFER.NXE bit. */3121 /** Mirror of the EFER.NXE bit. Managed by PGMNotifyNxeChanged. */ 3122 3122 bool fNoExecuteEnabled; 3123 3123 /** Unused bits. */ -
trunk/src/VBox/VMM/PGMSavedState.cpp
r30948 r31080 3052 3052 AssertLogRelRCReturn(rc, rc); 3053 3053 3054 /* Restore pVM->pgm.s.GCPhysCR3. */3054 /* Update pVM->pgm.s.GCPhysCR3. */ 3055 3055 Assert(pVCpu->pgm.s.GCPhysCR3 == NIL_RTGCPHYS); 3056 3056 RTGCPHYS GCPhysCR3 = CPUMGetGuestCR3(pVCpu); … … 3063 3063 GCPhysCR3 = (GCPhysCR3 & X86_CR3_PAGE_MASK); 3064 3064 pVCpu->pgm.s.GCPhysCR3 = GCPhysCR3; 3065 3066 /* Update the PSE, NX flags and validity masks. */ 3067 pVCpu->pgm.s.fGst32BitPageSizeExtension = CPUMIsGuestPageSizeExtEnabled(pVCpu); 3068 PGMNotifyNxeChanged(pVCpu, CPUMIsGuestNXEnabled(pVCpu)); 3065 3069 } 3066 3070 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31067 r31080 2006 2006 2007 2007 /** 2008 * Called whenever CR0 or CR4 in a way which may change 2009 * the paging mode. 2008 * Called whenever CR0 or CR4 in a way which may affect the paging mode. 2010 2009 * 2011 2010 * @returns VBox status code, with the following informational code for … … 2034 2033 enmGuestMode = PGMMODE_PROTECTED; 2035 2034 else if (!(cr4 & X86_CR4_PAE)) 2035 { 2036 bool const fPse = !!(cr4 & X86_CR4_PSE); 2037 if (pVCpu->pgm.s.fGst32BitPageSizeExtension != fPse) 2038 Log(("PGMChangeMode: CR4.PSE %d -> %d\n", pVCpu->pgm.s.fGst32BitPageSizeExtension, fPse)); 2039 pVCpu->pgm.s.fGst32BitPageSizeExtension = fPse; 2036 2040 enmGuestMode = PGMMODE_32_BIT; 2041 } 2037 2042 else if (!(efer & MSR_K6_EFER_LME)) 2038 2043 {
Note:
See TracChangeset
for help on using the changeset viewer.