From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2xxL-0003tC-AH for qemu-devel@nongnu.org; Fri, 04 Jul 2014 03:30:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2xxG-000203-2T for qemu-devel@nongnu.org; Fri, 04 Jul 2014 03:30:51 -0400 Received: from [2001:41d0:8:2b42::1] (port=33030 helo=greensocs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2xxF-0001zz-S1 for qemu-devel@nongnu.org; Fri, 04 Jul 2014 03:30:45 -0400 Message-ID: <53B65823.3050006@greensocs.com> Date: Fri, 04 Jul 2014 09:30:43 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1404231220-17339-1-git-send-email-fred.konrad@greensocs.com> In-Reply-To: <1404231220-17339-1-git-send-email-fred.konrad@greensocs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] icount: warp in the main_loop. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, mark.burton@greensocs.com, peter.maydell@linaro.org On 01/07/2014 18:13, fred.konrad@greensocs.com wrote: > From: KONRAD Frederic > > This fixes a bug where QEMU stall in icount mode. > > It happens when a simple timer callback is created on VIRTUAL CLOCK modding > itself regularly. > > The actual warping mechanism is called once and then the time didn't grow > anymore. > > Signed-off-by: KONRAD Frederic > --- > main-loop.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/main-loop.c b/main-loop.c > index 8a85493..ef889b0 100644 > --- a/main-loop.c > +++ b/main-loop.c > @@ -489,6 +489,12 @@ int main_loop_wait(int nonblocking) > > qemu_clock_run_all_timers(); > > + /* > + * 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? Thanks, Fred