From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH 2/2] qemu-kvm: pc: Do not start APIC timer spuriously Date: Thu, 08 Sep 2011 12:51:35 +0200 Message-ID: <4E689E37.2040404@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm To: Avi Kivity , Marcelo Tosatti Return-path: Received: from goliath.siemens.de ([192.35.17.28]:25532 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758223Ab1IHKvq (ORCPT ); Thu, 8 Sep 2011 06:51:46 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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