All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] qemu-kvm: pc: Do not start APIC timer spuriously
@ 2011-09-08 10:51 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2011-09-08 10:51 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm

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.kiszka@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-08 10:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08 10:51 [PATCH 2/2] qemu-kvm: pc: Do not start APIC timer spuriously Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.