aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-defs.h1
-rw-r--r--include/exec/exec-all.h4
-rw-r--r--include/qom/cpu.h3
3 files changed, 6 insertions, 2 deletions
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index ca39f05567..ae64590cdf 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -148,7 +148,6 @@ typedef struct CPUWatchpoint {
#define CPU_TEMP_BUF_NLONGS 128
#define CPU_COMMON \
- struct TranslationBlock *current_tb; /* currently executing TB */ \
/* soft mmu support */ \
/* in order to avoid passing too many arguments to the MMIO \
helpers, we store some rarely used information in the CPU \
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index f685c28573..e856191e40 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -404,11 +404,13 @@ extern volatile sig_atomic_t exit_request;
instruction of a TB so that interrupts take effect immediately. */
static inline int can_do_io(CPUArchState *env)
{
+ CPUState *cpu = ENV_GET_CPU(env);
+
if (!use_icount) {
return 1;
}
/* If not executing code then assume we are ok. */
- if (!env->current_tb) {
+ if (cpu->current_tb == NULL) {
return 1;
}
return env->can_do_io != 0;
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 42f3f34bbd..c25a997808 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -71,6 +71,7 @@ struct kvm_run;
* @created: Indicates whether the CPU thread has been successfully created.
* @stop: Indicates a pending stop request.
* @stopped: Indicates the CPU has been artificially stopped.
+ * @current_tb: Currently executing TB.
* @kvm_fd: vCPU file descriptor for KVM.
*
* State of one CPU core or thread.
@@ -99,6 +100,8 @@ struct CPUState {
bool stopped;
volatile sig_atomic_t exit_request;
+ struct TranslationBlock *current_tb;
+
int kvm_fd;
bool kvm_vcpu_dirty;
struct KVMState *kvm_state;