summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLluís Vilanova2017-07-04 10:38:26 +0200
committerStefan Hajnoczi2017-07-17 14:10:54 +0200
commitd43811165df75571055dab7b602526a40404a63e (patch)
treec066c9b977186ee051851703dcc7ab5814926b1c /include
parenttrace: Allocate cpu->trace_dstate in place (diff)
downloadqemu-d43811165df75571055dab7b602526a40404a63e.tar.gz
qemu-d43811165df75571055dab7b602526a40404a63e.tar.xz
qemu-d43811165df75571055dab7b602526a40404a63e.zip
trace: [tcg] Delay changes to dynamic state when translating
This keeps consistency across all decisions taken during translation when the dynamic state of a vCPU is changed in the middle of translating some guest code. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Message-id: 149915750615.6295.3713699402253529487.stgit@frigg.lan Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qom/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 5f188d4c28..25eefea7ab 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -302,6 +302,8 @@ struct qemu_work_item;
* @kvm_fd: vCPU file descriptor for KVM.
* @work_mutex: Lock to prevent multiple access to queued_work_*.
* @queued_work_first: First asynchronous work pending.
+ * @trace_dstate_delayed: Delayed changes to trace_dstate (includes all changes
+ * to @trace_dstate).
* @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask).
*
* State of one CPU core or thread.
@@ -372,6 +374,7 @@ struct CPUState {
struct kvm_run *kvm_run;
/* Used for events with 'vcpu' and *without* the 'disabled' properties */
+ DECLARE_BITMAP(trace_dstate_delayed, CPU_TRACE_DSTATE_MAX_EVENTS);
DECLARE_BITMAP(trace_dstate, CPU_TRACE_DSTATE_MAX_EVENTS);
/* TODO Move common fields from CPUArchState here. */