diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-04-22 13:20:32 -0400 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-04-22 13:20:32 -0400 |
commit | 2607efded8ea856d632f017e93b40f1780046db1 (patch) | |
tree | 1d9c6072a2cc3189db43a39017fddec0af45691f /src/cpu/base.hh | |
parent | f485ad190830ab61d58ecdb8eb48621ffeb3008f (diff) | |
download | gem5-2607efded8ea856d632f017e93b40f1780046db1.tar.xz |
kvm: Avoid synchronizing the TC on every KVM exit
Reduce the number of KVM->TC synchronizations by overloading the
getContext() method and only request an update when the TC is
requested as opposed to every time KVM returns to gem5.
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r-- | src/cpu/base.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh index 34e1f718c..65f596132 100644 --- a/src/cpu/base.hh +++ b/src/cpu/base.hh @@ -252,7 +252,7 @@ class BaseCPU : public MemObject int findContext(ThreadContext *tc); /// Given a thread num get tho thread context for it - ThreadContext *getContext(int tn) { return threadContexts[tn]; } + virtual ThreadContext *getContext(int tn) { return threadContexts[tn]; } public: typedef BaseCPUParams Params; |