From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mruev-0004ja-GW for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:23:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mruer-0004dH-48 for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:23:29 -0400 Received: from [199.232.76.173] (port=46135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mrueq-0004cy-RO for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:23:24 -0400 Received: from mail-bw0-f211.google.com ([209.85.218.211]:63193) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mrueq-0001zY-FU for qemu-devel@nongnu.org; Sun, 27 Sep 2009 10:23:24 -0400 Received: by bwz7 with SMTP id 7so2918368bwz.34 for ; Sun, 27 Sep 2009 07:23:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Sun, 27 Sep 2009 17:23:03 +0300 Message-ID: Subject: Re: [Qemu-devel] Main loop Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On Sun, Sep 27, 2009 at 2:55 AM, malc wrote: > > At http://repo.or.cz/w/qemu/malc.git?a=3Dshortlog;h=3Drefs/heads/mtloop y= ou > can find the branch which refactors main execution loop somewhat, effects > include: > > a. Host alarm timers are gone > b. IO thread is replaced (now Windows is supported too) > > I have no means of testing the KVM/Xen bits (both are likely to be broken > by this), and since testing was only done on Linux/X86-64[1],PPC and > Windows/i386 chances are good that something might be not so great in > BSD/Solairs/MacOS X lands. > > Apart from obvious KVM bits, other things were not implemented (yet) > either: proper VM stop/resume, GDB, etc. > > Diffstat relative to c2b023b62707f5dc73497dc03f3764f145a29785 (plus > one somewhat unrelated local commit) is bellow. > > =C2=A0Makefile =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A01 - > =C2=A0configure =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A08 - > =C2=A0cpu-defs.h =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 - > =C2=A0cpu-exec.c =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A03 + > =C2=A0hw/xenfb.c =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 +- > =C2=A0qemu-options.hx | =C2=A0 =C2=A09 - > =C2=A0qemu-thread.c =C2=A0 | =C2=A0163 ------ > =C2=A0qemu-thread.h =C2=A0 | =C2=A0 40 -- > =C2=A0sysemu.h =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A02 +- > =C2=A0vl.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 1650 ++++++++++++++= ++++++----------------------------------- > =C2=A010 files changed, 593 insertions(+), 1287 deletions(-) > > Comments? +extern void ontb (CPUState *env); + Please try to avoid prototypes outside header files. The name does not tell what the function does. if (delta < MIN_TIMER_REARM_US) delta =3D MIN_TIMER_REARM_US; + if (delta > MIN_TIMER_REARM_US) + delta =3D MIN_TIMER_REARM_US; The above four lines are equal to delta =3D MIN_TIMER_REARM_US; Maybe the latter two should use MAX_TIMER_REARM_US?