VirtualBox

Ignore:
Timestamp:
Feb 13, 2021 2:13:15 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142804
Message:

VMM/HM: Don't use ordered writes for pVCpu->hm.s.fCheckedTLBFlush as it's only ever checked together with cWorldSwitchExits by hmR0PokeCpu, and cWorldSwitchExits is written atomically right afterwards. Both variables are only updated by the EMT owning them. bugref:9941

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r87751 r87752  
    13061306
    13071307    /* Set TLB flush state as checked until we return from the world switch. */
    1308     ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);
     1308    ASMAtomicUoWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);
    13091309
    13101310    /* Check for explicit TLB flushes. */
     
    42734273#endif
    42744274
    4275     ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);    /* Used for TLB flushing, set this across the world switch. */
     4275    ASMAtomicUoWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, true);  /* Used for TLB flushing, set this across the world switch. */
    42764276    /* Flush the appropriate tagged-TLB entries. */
    42774277    hmR0SvmFlushTaggedTlb(pHostCpu,  pVCpu, pVmcb);
     
    43514351
    43524352    uint64_t const uHostTsc = ASMReadTSC();                     /* Read the TSC as soon as possible. */
    4353     ASMAtomicWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, false);  /* See HMInvalidatePageOnAllVCpus(): used for TLB flushing. */
     4353    ASMAtomicUoWriteBool(&pVCpu->hm.s.fCheckedTLBFlush, false); /* See HMInvalidatePageOnAllVCpus(): used for TLB flushing. */
    43544354    ASMAtomicIncU32(&pVCpu->hmr0.s.cWorldSwitchExits);          /* Initialized in vmR3CreateUVM(): used for EMT poking. */
    43554355
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette