summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2014-12-08 10:53:17 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:02 +0100
commit626cf8f4c6157ed133f0daa89b90d4169060bc97 (patch)
tree23512ce2d0b23dbed95062559c7f5fef6029c8cf /cpus.c
parente511b4d783c47a32420da802104cfb0eb974b22f (diff)
downloadqemu-626cf8f4c6157ed133f0daa89b90d4169060bc97.zip
icount: set can_do_io outside TB execution
This patch sets can_do_io function to allow reading icount within cpu-exec, but outside TB execution. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 91119bb864..615d4ae07d 100644
--- a/cpus.c
+++ b/cpus.c
@@ -935,6 +935,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
qemu_thread_get_self(cpu->thread);
cpu->thread_id = qemu_get_thread_id();
cpu->exception_index = -1;
+ cpu->can_do_io = 1;
current_cpu = cpu;
r = kvm_init_vcpu(cpu);
@@ -976,6 +977,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
qemu_thread_get_self(cpu->thread);
cpu->thread_id = qemu_get_thread_id();
cpu->exception_index = -1;
+ cpu->can_do_io = 1;
sigemptyset(&waitset);
sigaddset(&waitset, SIG_IPI);
@@ -1019,6 +1021,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->exception_index = -1;
+ cpu->can_do_io = 1;
}
qemu_cond_signal(&qemu_cpu_cond);