VirtualBox

Changeset 30247 in vbox for trunk


Ignore:
Timestamp:
Jun 16, 2010 1:21:23 PM (15 years ago)
Author:
vboxsync
Message:

Fix page fusion on smp guests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMSharedPage.cpp

    r30061 r30247  
    136136static DECLCALLBACK(VBOXSTRICTRC) pgmR3SharedModuleRegRendezvous(PVM pVM, PVMCPU pVCpu, void *pvUser)
    137137{
     138    VMCPUID idCpu = *(VMCPUID *)pvUser;
     139
     140    /* Execute on the VCPU that issued the original request to make sure we're in the right cr3 context. */
     141    if (pVCpu->idCpu != idCpu)
     142        return VINF_SUCCESS;
     143
    138144    /* Flush all pending handy page operations before changing any shared page assignments. */
    139145    int rc = PGMR3PhysAllocateHandyPages(pVM);
     
    155161static DECLCALLBACK(void) pgmR3CheckSharedModulesHelper(PVM pVM)
    156162{
     163    VMCPUID idCpu = VMMGetCpuId(pVM);
     164
    157165    /* We must stall other VCPUs as we'd otherwise have to send IPI flush commands for every single change we make. */
    158     int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, pgmR3SharedModuleRegRendezvous, NULL);
     166    int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, pgmR3SharedModuleRegRendezvous, &idCpu);
    159167    AssertRC(rc);
    160168}
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