All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: TeLeMan <geleman@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH, RFC] qemu-timer: fix alarm_timer pending
Date: Fri, 19 Mar 2010 10:33:19 +0100	[thread overview]
Message-ID: <4BA344DF.2060105@redhat.com> (raw)
In-Reply-To: <a38b25541003182224s6caa2bc5m8f9dd2e2b17fc934@mail.gmail.com>

On 03/19/2010 06:24 AM, TeLeMan wrote:
> I fetched the lastest qemu-timer codes and found qemu would have no
> response when the guest os was WinXP and the timer was "dynticks" on
> the win32 host.  After qemu froze, it seemed the win32_rearm_timer()
> would never be called and alarm_timer->pending was always 0.
> I could not find the more deeper reason and just referred to the
> previous implement to make this patch.

Interesting, it ran fine for me under Wine.

I can see why the patch you have works, but I don't think it's 100% 
correct.  alarm_timer->pending should remain 1 until qemu_run_all_timers 
runs.  Can you test this one instead:

diff --git a/qemu-timer.c b/qemu-timer.c
index 329d3a4..49eac86 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -706,14 +706,14 @@ void configure_icount(const char *option)

  void qemu_run_all_timers(void)
  {
+    alarm_timer->pending = 0;
+
      /* rearm timer, if not periodic */
      if (alarm_timer->expired) {
          alarm_timer->expired = 0;
          qemu_rearm_alarm_timer(alarm_timer);
      }

-    alarm_timer->pending = 0;
-
      /* vm time timers */
      if (vm_running) {
          qemu_run_timers(vm_clock);


If it doesn't work, I'm fine with TeLeMan's patch.

Paolo

  reply	other threads:[~2010-03-19  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  5:24 [Qemu-devel] [PATCH, RFC] qemu-timer: fix alarm_timer pending TeLeMan
2010-03-19  9:33 ` Paolo Bonzini [this message]
2010-03-19  9:47   ` [Qemu-devel] " TeLeMan
2010-03-19 10:30     ` [Qemu-devel] [PATCH] fix race between timer firing vs. alarm_timer->pending = 0 Paolo Bonzini
2010-03-27 13:05       ` Aurelien Jarno

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=4BA344DF.2060105@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=geleman@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.