VirtualBox

Changeset 20409 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 8, 2009 1:57:52 PM (16 years ago)
Author:
vboxsync
Message:

Protect REMNotifyInvalidatePage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/REMAll.cpp

    r20406 r20409  
    2626#define LOG_GROUP LOG_GROUP_REM
    2727#include <VBox/rem.h>
     28#include <VBox/em.h>
    2829#include <VBox/vmm.h>
    2930#include "REMInternal.h"
     
    4647VMMDECL(int) REMNotifyInvalidatePage(PVM pVM, RTGCPTR GCPtrPage)
    4748{
    48     if (pVM->rem.s.cInvalidatedPages < RT_ELEMENTS(pVM->rem.s.aGCPtrInvalidatedPages))
     49    if (    EMTryEnterRemLock(pVM) == VINF_SUCCESS  /* if this fails, then we'll just flush the tlb as we don't want to waste time here. */
     50        &&  pVM->rem.s.cInvalidatedPages < RT_ELEMENTS(pVM->rem.s.aGCPtrInvalidatedPages))
    4951    {
    5052        /*
     
    5254         */
    5355        pVM->rem.s.aGCPtrInvalidatedPages[pVM->rem.s.cInvalidatedPages++] = GCPtrPage;
     56        EMRemUnlock(pVM);
    5457    }
    5558    else
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