Correct alarm deadline computation
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 3 Feb 2011 13:49:00 +0000 (14:49 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 4 Feb 2011 12:33:26 +0000 (06:33 -0600)
commitd148200c7a31ed130748a69d99dfd789bc44e314
tree26cee8f2413348788f943b53ac98257ce3675391
parentb261340e0695cecdc261c77623d0af059f1aaef0
Correct alarm deadline computation

When the QEMU_CLOCK_HOST clock was added, computation of its
deadline was added to qemu_next_deadline, which is correct but
incomplete.

I noticed this by reading the very convoluted rules whereby
qemu_next_deadline_dyntick is computed, which miss QEMU_CLOCK_HOST
when use_icount is true.  This patch inlines qemu_next_deadline
into qemu_next_deadline_dyntick, and then corrects the logic to skip
only QEMU_CLOCK_VIRTUAL when use_icount is true.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-timer.c