Changeset 27488 in vbox for trunk/src/VBox
- Timestamp:
- Mar 18, 2010 4:12:49 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r27282 r27488 715 715 * This is a page that's shared with other VMs. */ 716 716 #define PGM_PAGE_STATE_SHARED 3 717 /** The page is ballooned, so no longer available for this VM. */ 718 #define PGM_PAGE_STATE_BALLOONED 4 717 719 /** @} */ 718 720 … … 819 821 #define PGM_PAGE_IS_SHARED(pPage) ( (pPage)->uStateY == PGM_PAGE_STATE_SHARED ) 820 822 823 /** 824 * Checks if the page is ballooned. 825 * @returns true/false. 826 * @param pPage Pointer to the physical guest page tracking structure. 827 */ 828 #define PGM_PAGE_IS_BALLOONED(pPage) ( (pPage)->uStateY == PGM_PAGE_STATE_BALLOONED ) 821 829 822 830 /** … … 3350 3358 void pgmPhysPageMakeWriteMonitoredWritable(PVM pVM, PPGMPAGE pPage); 3351 3359 int pgmPhysPageMakeWritable(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys); 3352 int pgmPhysPageMakeWritableUnlocked(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys);3353 3360 int pgmPhysPageMakeWritableAndMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv); 3354 3361 int pgmPhysPageMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r27486 r27488 807 807 Log(("PGM #PF: Make writable: %RGp %R[pgmpage] pvFault=%RGp uErr=%#x\n", 808 808 GCPhys, pPage, pvFault, uErr)); 809 rc = pgmPhysPageMakeWritable Unlocked(pVM, pPage, GCPhys);809 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys); 810 810 if (rc != VINF_SUCCESS) 811 811 { … … 1410 1410 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM) 1411 1411 { 1412 rc = pgmPhysPageMakeWritable Unlocked(pVM, pPage, PteSrc.u & GST_PTE_PG_MASK);1412 rc = pgmPhysPageMakeWritable(pVM, pPage, PteSrc.u & GST_PTE_PG_MASK); 1413 1413 AssertRC(rc); 1414 1414 } … … 1797 1797 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM) 1798 1798 { 1799 rc = pgmPhysPageMakeWritable Unlocked(pVM, pPage, GCPhys);1799 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys); 1800 1800 AssertRC(rc); 1801 1801 } … … 2381 2381 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM) 2382 2382 { 2383 rc = pgmPhysPageMakeWritable Unlocked(pVM, pPage, pPteSrc->u & GST_PTE_PG_MASK);2383 rc = pgmPhysPageMakeWritable(pVM, pPage, pPteSrc->u & GST_PTE_PG_MASK); 2384 2384 AssertRC(rc); 2385 2385 } … … 2814 2814 && PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_RAM) 2815 2815 { 2816 rc = pgmPhysPageMakeWritable Unlocked(pVM, pPage, GCPhys);2816 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys); 2817 2817 AssertRCReturn(rc, rc); 2818 2818 if (VM_FF_ISPENDING(pVM, VM_FF_PGM_NO_MEMORY)) -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r27163 r27488 652 652 int pgmPhysPageMakeWritable(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys) 653 653 { 654 Assert(PGMIsLockOwner(pVM)); 654 655 switch (PGM_PAGE_GET_STATE(pPage)) 655 656 { … … 673 674 return pgmPhysAllocPage(pVM, pPage, GCPhys); 674 675 } 675 }676 677 678 /**679 * Wrapper for pgmPhysPageMakeWritable which enters the critsect.680 *681 * @returns VBox strict status code.682 * @retval VINF_SUCCESS on success.683 * @retval VINF_PGM_SYNC_CR3 on success and a page pool flush is pending.684 * @retval VERR_PGM_PHYS_PAGE_RESERVED it it's a valid page but has no physical backing.685 *686 * @param pVM The VM address.687 * @param pPage The physical page tracking structure.688 * @param GCPhys The address of the page.689 */690 int pgmPhysPageMakeWritableUnlocked(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys)691 {692 int rc = pgmLock(pVM);693 if (RT_SUCCESS(rc))694 {695 rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);696 pgmUnlock(pVM);697 }698 return rc;699 676 } 700 677
Note:
See TracChangeset
for help on using the changeset viewer.