diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-03-30 10:52:25 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-03-30 10:52:25 +0100 |
commit | a3efb6bd1d0d83297b5b412badc0b7db98b7be1e (patch) | |
tree | 424147084794cefe47a22b53758bfb538d1bc16e /src/cpu/kvm/base.hh | |
parent | d4eb354e30171c8c1d65c7158eb05369be6c5e2e (diff) | |
download | gem5-a3efb6bd1d0d83297b5b412badc0b7db98b7be1e.tar.xz |
kvm: Add an option to force context sync on kvm entry/exit
This changeset adds an option to force the kvm-based CPUs to always
synchronize the gem5 thread context representation on entry/exit into
the kernel. This is very useful for debugging. Unfortunately, it is
also the only way to get reliable register contents when using remote
gdb functionality. The long-term solution for the latter would be to
implement a kvm-specific thread context.
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Alexandru Dutu <alexandru.dutu@amd.com>
Diffstat (limited to 'src/cpu/kvm/base.hh')
-rw-r--r-- | src/cpu/kvm/base.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/kvm/base.hh b/src/cpu/kvm/base.hh index dd27328be..7ff0cab5c 100644 --- a/src/cpu/kvm/base.hh +++ b/src/cpu/kvm/base.hh @@ -575,6 +575,12 @@ class BaseKvmCPU : public BaseCPU KVMCpuPort instPort; /** + * Be conservative and always synchronize the thread context on + * KVM entry/exit. + */ + const bool alwaysSyncTC; + + /** * Is the gem5 context dirty? Set to true to force an update of * the KVM vCPU state upon the next call to kvmRun(). */ |