qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH, RFC] qemu-timer: fix alarm_timer pending


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH, RFC] qemu-timer: fix alarm_timer pending
Date: Fri, 19 Mar 2010 10:33:19 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

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 via email to

[Prev in Thread] Current Thread [Next in Thread]