qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] icount: warp in the main_loop.


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC] icount: warp in the main_loop.
Date: Fri, 04 Jul 2014 09:57:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Il 04/07/2014 09:30, Frederic Konrad ha scritto:
  +    /*
+     * In icount mode, sometimes the VCPU is blocked and an event is
needed to
+     * continue.
+     * Just warp to make the time grows and have a chance to run the
CPU.
+     */
+    qemu_clock_warp(QEMU_CLOCK_VIRTUAL);
      return ret;
  }

Paolo,
You mentioned some icount patches (I can't find where) can you point me
to them?
Did you already had this bug?

Why is this needed? It's possible that a qemu_clock_warp code is missing somewhere, but for timers it should be handled here:

static void timerlist_rearm(QEMUTimerList *timer_list)
{
    /* Interrupt execution to force deadline recalculation.  */
    qemu_clock_warp(timer_list->clock->type);
    timerlist_notify(timer_list);
}

If the VCPU is blocked, it will set vm_clock_warp_start to the realtime clock value ("clock") a QEMU_CLOCK_REALTIME timer to the next deadline ("clock + deadline"). At the next deadline, icount_warp_rt will increase QEMU_CLOCK_VIRTUAL by "clock - vm_clock_warp_state" which should trigger the clock event.

Paolo



reply via email to

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