apic_timer_update not only calculates the next timer expiry that we need
to write out the vmstate, it may also start the timer of the user space
APIC model. That can cause spurious signals to the corresponding vCPU
thread when the timer expires. Fix this by using the new apic_next_timer
that does not start the timer.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---

Found while hunting user space exits of our never-exits-to-user-space
real-time guest.

 hw/apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/apic.c b/hw/apic.c
index b3044aa..e43219f 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -950,7 +950,7 @@ static void kvm_kernel_lapic_save_to_user(APICState *s)
     s->count_shift = (v + 1) & 7;
 
     s->initial_count_load_time = qemu_get_clock_ns(vm_clock);
-    apic_timer_update(s, s->initial_count_load_time);
+    apic_next_timer(s, s->initial_count_load_time);
 }
 
 static void kvm_kernel_lapic_load_from_user(APICState *s)
-- 
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to