VirtualBox

Changeset 27489 in vbox


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

Disabled the lazy syncing of zero pages based on the u1Write setting. Currently causes inconsistencies with PAE dirty pages
and looks quite inefficient (flushing if multiple references).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r27488 r27489  
    805805                    if (PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED)
    806806                    {
    807                         Log(("PGM #PF: Make writable: %RGp %R[pgmpage] pvFault=%RGp uErr=%#x\n",
    808                              GCPhys, pPage, pvFault, uErr));
     807                        Log(("PGM #PF: Make writable: %RGp %R[pgmpage] pvFault=%RGp uErr=%#x\n", GCPhys, pPage, pvFault, uErr));
     808                        Assert(!PGM_PAGE_IS_ZERO(pPage));
     809
    809810                        rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
    810811                        if (rc != VINF_SUCCESS)
     
    14021403        {
    14031404#ifndef VBOX_WITH_NEW_LAZY_PAGE_ALLOC
    1404             /* Try make the page writable if necessary. */
    1405             if (    PteSrc.n.u1Write
    1406                 &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
     1405            /* Try to make the page writable if necessary. */
     1406            if (    PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM
     1407                &&  (   PGM_PAGE_IS_ZERO(pPage)
     1408                     || (   PteSrc.n.u1Write
     1409                         && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
    14071410# ifdef VBOX_WITH_REAL_WRITE_MONITORED_PAGES
    1408                 &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
    1409 # endif
    1410                 &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     1411                         && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
     1412# endif
     1413                         && PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     1414                     )
     1415               )
    14111416            {
    14121417                rc = pgmPhysPageMakeWritable(pVM, pPage, PteSrc.u & GST_PTE_PG_MASK);
     
    17891794                {
    17901795# ifndef VBOX_WITH_NEW_LAZY_PAGE_ALLOC
    1791                     /* Try make the page writable if necessary. */
    1792                     if (    PdeSrc.n.u1Write
    1793                         &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
     1796                    /* Try to make the page writable if necessary. */
     1797                    if (    PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM
     1798                        &&  (   PGM_PAGE_IS_ZERO(pPage)
     1799                             || (   PdeSrc.n.u1Write
     1800                                 && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
    17941801#  ifdef VBOX_WITH_REAL_WRITE_MONITORED_PAGES
    1795                         &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
    1796 #  endif
    1797                         &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     1802                                 && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
     1803#  endif
     1804                                 && PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     1805                             )
     1806                       )
    17981807                    {
    17991808                        rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
     
    28062815
    28072816# ifndef VBOX_WITH_NEW_LAZY_PAGE_ALLOC
    2808                         /* Try make the page writable if necessary. */
    2809                         if (    PteDstBase.n.u1Write
    2810                             &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
    2811 # ifdef VBOX_WITH_REAL_WRITE_MONITORED_PAGES
    2812                             &&  PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
    2813 # endif
    2814                             &&  PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     2817                        /* Try to make the page writable if necessary. */
     2818                        if (    PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM
     2819                            &&  (   PGM_PAGE_IS_ZERO(pPage)
     2820                                 || (   PteDstBase.n.u1Write
     2821                                     && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED
     2822#  ifdef VBOX_WITH_REAL_WRITE_MONITORED_PAGES
     2823                                     && PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_WRITE_MONITORED
     2824#  endif
     2825                                     && PGM_PAGE_GET_TYPE(pPage)  == PGMPAGETYPE_RAM)
     2826                                 )
     2827                           )
    28152828                        {
    28162829                            rc = pgmPhysPageMakeWritable(pVM, pPage, GCPhys);
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