VirtualBox

Changeset 11711 in vbox


Ignore:
Timestamp:
Aug 27, 2008 4:08:15 PM (16 years ago)
Author:
vboxsync
Message:

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

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

Legend:

Unmodified
Added
Removed
  • 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;
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