From ce2139a533ec34f37d70d71627510e881fd617b8 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 23 Sep 2016 17:59:20 +0200 Subject: [PATCH] vbox: add tm 4s patch Issue #2110 --- repos/ports/ports/virtualbox.hash | 2 +- repos/ports/ports/virtualbox5.hash | 2 +- .../src/virtualbox/patches/series_common | 1 + .../ports/src/virtualbox/patches/tm_4s.patch | 42 +++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 repos/ports/src/virtualbox/patches/tm_4s.patch diff --git a/repos/ports/ports/virtualbox.hash b/repos/ports/ports/virtualbox.hash index 2f84683fe7..bcb1bf0bfb 100644 --- a/repos/ports/ports/virtualbox.hash +++ b/repos/ports/ports/virtualbox.hash @@ -1 +1 @@ -38087cad05854ea953885c3c7187dc25d323140e +02d35b49aef0818e5c3f17720d7cf659661b45ed diff --git a/repos/ports/ports/virtualbox5.hash b/repos/ports/ports/virtualbox5.hash index 8fa2f98c9e..aa43a0cc34 100644 --- a/repos/ports/ports/virtualbox5.hash +++ b/repos/ports/ports/virtualbox5.hash @@ -1 +1 @@ -f22cfd50576d6821473e202a8a3fc973a9f808d4 +35ce173a7916f4a2f3b8bd6bf616506f63e43ac0 diff --git a/repos/ports/src/virtualbox/patches/series_common b/repos/ports/src/virtualbox/patches/series_common index 450ff03015..f44738f684 100644 --- a/repos/ports/src/virtualbox/patches/series_common +++ b/repos/ports/src/virtualbox/patches/series_common @@ -15,3 +15,4 @@ time-log-deadlock.patch tm_retries.patch vmdk.patch tm_tpr.patch +tm_4s.patch diff --git a/repos/ports/src/virtualbox/patches/tm_4s.patch b/repos/ports/src/virtualbox/patches/tm_4s.patch new file mode 100644 index 0000000000..014445cc3d --- /dev/null +++ b/repos/ports/src/virtualbox/patches/tm_4s.patch @@ -0,0 +1,42 @@ +--- a/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAllVirtual.cpp ++++ b/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAllVirtual.cpp +@@ -437,7 +437,7 @@ + bool fStop = false; + const uint64_t u64Prev = pVM->tm.s.u64VirtualSyncCatchUpPrev; + uint64_t u64Delta = u64 - u64Prev; +- if (RT_LIKELY(!(u64Delta >> 32))) ++ if (RT_LIKELY(!(u64Delta >> 63))) + { + uint64_t u64Sub = ASMMultU64ByU32DivByU32(u64Delta, pVM->tm.s.u32VirtualSyncCatchUpPercentage, 100); + if (off > u64Sub + pVM->tm.s.offVirtualSyncGivenUp) +@@ -770,7 +770,7 @@ + || cOuterTries <= 0) + { + uint64_t u64Delta = u64 - u64Prev; +- if (RT_LIKELY(!(u64Delta >> 32))) ++ if (RT_LIKELY(!(u64Delta >> 63))) + { + uint64_t u64Sub = ASMMultU64ByU32DivByU32(u64Delta, u32Pct, 100); + if (off > u64Sub + offGivenUp) +--- a/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp ++++ b/src/app/virtualbox/src/VBox/VMM/VMMAll/TMAll.cpp +@@ -857,7 +857,7 @@ + || cOuterTries <= 0) + { + uint64_t u64Delta = u64Now - u64Prev; +- if (RT_LIKELY(!(u64Delta >> 32))) ++ if (RT_LIKELY(!(u64Delta >> 63))) + { + uint64_t u64Sub = ASMMultU64ByU32DivByU32(u64Delta, u32Pct, 100); + if (off > u64Sub + offGivenUp) +--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp ++++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/TM.cpp +@@ -2149,7 +2160,7 @@ + if (pVM->tm.s.fVirtualSyncCatchUp) + { + uint64_t u64Delta = u64VirtualNow - pVM->tm.s.u64VirtualSyncCatchUpPrev; +- if (RT_LIKELY(!(u64Delta >> 32))) ++ if (RT_LIKELY(!(u64Delta >> 63))) + { + uint64_t u64Sub = ASMMultU64ByU32DivByU32(u64Delta, pVM->tm.s.u32VirtualSyncCatchUpPercentage, 100); + if (off > u64Sub + offSyncGivenUp)