This is a "real" fix for -icount, real in the sense that it works in all cases including those that weren't fixed by my first attempt.
Patch 1 is the three-line fix. With that in, patch 2 can revert the previous attempt(s). Finally, patch 3 makes the icount code clearer by finishing the bugfix/reorganization of qemu_next_deadline vs. qemu_next_alarm_deadline. v1->v2: reordered patches, renamed qemu_next_deadline Paolo Bonzini (3): really fix -icount in the iothread case Revert wrong fix for -icount in the iothread case qemu_next_deadline should not consider host-time timers cpus.c | 5 +++- qemu-timer.c | 75 +++++++++++++++++++++++++++++---------------------------- qemu-timer.h | 2 +- 3 files changed, 43 insertions(+), 39 deletions(-) -- 1.7.4