summaryrefslogtreecommitdiff
path: root/src/arch/x86/utility.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/utility.cc')
-rw-r--r--src/arch/x86/utility.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/x86/utility.cc b/src/arch/x86/utility.cc
index ae6c37be6..e3d25fcdf 100644
--- a/src/arch/x86/utility.cc
+++ b/src/arch/x86/utility.cc
@@ -209,6 +209,10 @@ copyMiscRegs(ThreadContext *src, ThreadContext *dest)
dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
}
+ // The TSC has to be updated with side-effects if the CPUs in a
+ // CPU switch have different frequencies.
+ dest->setMiscReg(MISCREG_TSC, src->readMiscReg(MISCREG_TSC));
+
dest->getITBPtr()->flushAll();
dest->getDTBPtr()->flushAll();
}