VirtualBox

Changeset 11711

Show
Ignore:
Timestamp:
08/27/08 18:08:15 (3 months ago)
Author:
vboxsync
Message:

Deal with PGMR3MappingsUnfix flushing the entire page pool. In long mode the cached CR3 page will be flushed as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/VMM/PGMMap.cpp

    r11311 r11711  
    450450    pgmPoolFlushAll(pVM); 
    451451#endif 
    452     int rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, pVM->pgm.s.GCPhysCR3); 
     452    /* Remap CR3 as we have just flushed the CR3 shadow PML4 in case we're in long mode. */ 
     453    int rc = PGM_GST_PFN(MapCR3, pVM)(pVM, pVM->pgm.s.GCPhysCR3); 
     454    AssertRC(rc); 
     455 
     456    rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, pVM->pgm.s.GCPhysCR3); 
    453457    AssertRC(rc); 
    454458 
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r11533 r11711  
    494494                if (pVM->pgm.s.pHCShwAmd64CR3) 
    495495                { 
    496                     pgmPoolFreeByPage(pPool, pVM->pgm.s.pHCShwAmd64CR3, PGMPOOL_IDX_AMD64_CR3, pVM->pgm.s.pHCShwAmd64CR3->GCPhys >> PAGE_SHIFT); 
     496                    /* It might have been freed already by a pool flush (see e.g. PGMR3MappingsUnfix). */ 
     497                    if (pgmPoolGetPage(pPool, pVM->pgm.s.pHCShwAmd64CR3->GCPhys)) 
     498                        pgmPoolFreeByPage(pPool, pVM->pgm.s.pHCShwAmd64CR3, PGMPOOL_IDX_AMD64_CR3, pVM->pgm.s.pHCShwAmd64CR3->GCPhys >> PAGE_SHIFT); 
    497499                    pVM->pgm.s.pHCShwAmd64CR3 = 0; 
    498500                    pVM->pgm.s.pHCPaePML4     = 0; 
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r11434 r11711  
    20242024     * Lazy approach. 
    20252025     */ 
     2026    /* @todo incompatible with long mode paging (cr3 root will be flushed) */ 
     2027    Assert(!CPUMIsGuestInLongMode(pVM)); 
    20262028    pgmPoolFlushAllInt(pPool); 
    20272029    return VERR_PGM_POOL_FLUSHED; 
     
    37313733     * a cheap replacement strategy... 
    37323734     */ 
     3735    /* @todo incompatible with long mode paging (cr3 root will be flushed) */ 
     3736    Assert(!CPUMIsGuestInLongMode(pVM)); 
    37333737    pgmPoolFlushAllInt(pPool); 
    37343738    return VERR_PGM_POOL_FLUSHED; 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy