VirtualBox

Changeset 27488 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 18, 2010 4:12:49 PM (15 years ago)
Author:
vboxsync
Message:

No need for pgmPhysPageMakeWritableUnlocked

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInternal.h

    r27282 r27488  
    715715 * This is a page that's shared with other VMs. */
    716716#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
    717719/** @} */
    718720
     
    819821#define PGM_PAGE_IS_SHARED(pPage)           ( (pPage)->uStateY == PGM_PAGE_STATE_SHARED )
    820822
     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 )
    821829
    822830/**
     
    33503358void            pgmPhysPageMakeWriteMonitoredWritable(PVM pVM, PPGMPAGE pPage);
    33513359int             pgmPhysPageMakeWritable(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys);
    3352 int             pgmPhysPageMakeWritableUnlocked(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys);
    33533360int             pgmPhysPageMakeWritableAndMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv);
    33543361int             pgmPhysPageMap(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void **ppv);
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r27486 r27488  
    807807                        Log(("PGM #PF: Make writable: %RGp %R[pgmpage] pvFault=%RGp uErr=%#x\n",
    808808                             GCPhys, pPage, pvFault, uErr));
    809                         rc = pgmPhysPageMakeWritableUnlocked(pVM, pPage, GCPhys);
     809                        rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
    810810                        if (rc != VINF_SUCCESS)
    811811                        {
     
    14101410                &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
    14111411            {
    1412                 rc = pgmPhysPageMakeWritableUnlocked(pVM, pPage, PteSrc.u & GST_PTE_PG_MASK);
     1412                rc = pgmPhysPageMakeWritable(pVM, pPage, PteSrc.u & GST_PTE_PG_MASK);
    14131413                AssertRC(rc);
    14141414            }
     
    17971797                        &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
    17981798                    {
    1799                         rc = pgmPhysPageMakeWritableUnlocked(pVM, pPage, GCPhys);
     1799                        rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
    18001800                        AssertRC(rc);
    18011801                    }
     
    23812381                                    && PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
    23822382                                {
    2383                                     rc = pgmPhysPageMakeWritableUnlocked(pVM, pPage, pPteSrc->u & GST_PTE_PG_MASK);
     2383                                    rc = pgmPhysPageMakeWritable(pVM, pPage, pPteSrc->u & GST_PTE_PG_MASK);
    23842384                                    AssertRC(rc);
    23852385                                }
     
    28142814                            &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
    28152815                        {
    2816                             rc = pgmPhysPageMakeWritableUnlocked(pVM, pPage, GCPhys);
     2816                            rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
    28172817                            AssertRCReturn(rc, rc);
    28182818                            if (VM_FF_ISPENDING(pVM, VM_FF_PGM_NO_MEMORY))
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r27163 r27488  
    652652int pgmPhysPageMakeWritable(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys)
    653653{
     654    Assert(PGMIsLockOwner(pVM));
    654655    switch (PGM_PAGE_GET_STATE(pPage))
    655656    {
     
    673674            return pgmPhysAllocPage(pVM, pPage, GCPhys);
    674675    }
    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;
    699676}
    700677
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette