aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/tcg-accel-ops.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index 684dc5a137..786d90c08f 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -97,16 +97,17 @@ static void tcg_accel_ops_init(AccelOpsClass *ops)
ops->create_vcpu_thread = mttcg_start_vcpu_thread;
ops->kick_vcpu_thread = mttcg_kick_vcpu_thread;
ops->handle_interrupt = tcg_handle_interrupt;
- } else if (icount_enabled()) {
- ops->create_vcpu_thread = rr_start_vcpu_thread;
- ops->kick_vcpu_thread = rr_kick_vcpu_thread;
- ops->handle_interrupt = icount_handle_interrupt;
- ops->get_virtual_clock = icount_get;
- ops->get_elapsed_ticks = icount_get;
} else {
ops->create_vcpu_thread = rr_start_vcpu_thread;
ops->kick_vcpu_thread = rr_kick_vcpu_thread;
- ops->handle_interrupt = tcg_handle_interrupt;
+
+ if (icount_enabled()) {
+ ops->handle_interrupt = icount_handle_interrupt;
+ ops->get_virtual_clock = icount_get;
+ ops->get_elapsed_ticks = icount_get;
+ } else {
+ ops->handle_interrupt = tcg_handle_interrupt;
+ }
}
}