kvm: Avoid synchronizing the TC on every KVM exit
Review Request #1749 - Created March 7, 2013 and submitted
| Information | |
|---|---|
| Ali Saidi | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9621:4560fb29509f --------------------------- 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.
Posted (March 16, 2013, 3:04 p.m.)
Looks good, again just a few minor suggestions.
-
src/cpu/kvm/base.hh (Diff revision 1) -
Is this comment really accurate? It seems like sometimes the up-to-date state is stored in the thread context, else you wouldn't have to update the kvm state...
-
src/cpu/kvm/base.hh (Diff revision 1) -
How about syncThreadContext() and syncKvmState()?
-
src/cpu/kvm/base.hh (Diff revision 1) -
I'd call this threadContextDirty so it's parallel with updateThreadContext() the way kvmStateDirty is parallel with updateKvmState().
-
src/cpu/kvm/base.cc (Diff revision 1) -
What do you think of adding this here: assert(!m5ContextDirty); There's an invariant here that at most one of m5ContextDirty and kvmStateDirty should be true at the same time, and it would be nice to check that once in a while.
-
src/cpu/kvm/base.cc (Diff revision 1) -
Similarly you could assert !kvmStateDirty here.
