VirtualBox

Changeset 2885 in vbox for trunk/src


Ignore:
Timestamp:
May 25, 2007 5:07:12 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21544
Message:

Read the previous value together with the GIP.

File:
1 edited

Legend:

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

    r2883 r2885  
    6161    uint64_t    u64NanoTS;
    6262    uint32_t    u32UpdateIntervalTSC;
     63    uint64_t    u64PrevNanoTS;
    6364
    6465    /*
    65      * Read the GIP data.
     66     * Read the GIP data and the previous value.
    6667     */
    6768    for (;;)
     
    8586            u32NanoTSFactor0 = pGip->u32UpdateIntervalNS;
    8687            u64Delta = ASMReadTSC();
     88            u64PrevNanoTS = ASMAtomicReadU64(&pVM->tm.s.u64VirtualRawPrev);
    8789            if (RT_UNLIKELY(    pGip->aCPUs[0].u32TransactionId != u32TransactionId
    8890                            ||  (u32TransactionId & 1)))
     
    112114            u32NanoTSFactor0 = pGip->u32UpdateIntervalNS;
    113115            u64Delta = ASMReadTSC();
     116            u64PrevNanoTS = ASMAtomicReadU64(&pVM->tm.s.u64VirtualRawPrev);
    114117            if (RT_UNLIKELY(u8ApicId != ASMGetApicId()))
    115118                continue;
     
    157160     */
    158161    u64NanoTS += u64Delta;
    159     uint64_t u64PrevNanoTS = ASMAtomicReadU64(&pVM->tm.s.u64VirtualRawPrev);
    160162    uint64_t u64DeltaPrev = u64NanoTS - u64PrevNanoTS;
    161163    if (RT_LIKELY(u64DeltaPrev < 1000000000 /* 1s */))
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