From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: [PATCH 2/2] qemu-kvm: pc: Do not start APIC timer spuriously
Date: Thu, 08 Sep 2011 12:51:35 +0200 [thread overview]
Message-ID: <4E689E37.2040404@siemens.com> (raw)
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
reply other threads:[~2011-09-08 10:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E689E37.2040404@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.