From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LywOO-00074W-4h for qemu-devel@nongnu.org; Tue, 28 Apr 2009 19:07:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LywOJ-00070s-JZ for qemu-devel@nongnu.org; Tue, 28 Apr 2009 19:07:11 -0400 Received: from [199.232.76.173] (port=57531 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LywOJ-00070n-Cg for qemu-devel@nongnu.org; Tue, 28 Apr 2009 19:07:07 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50797) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LywOI-0007UO-E9 for qemu-devel@nongnu.org; Tue, 28 Apr 2009 19:07:06 -0400 Date: Tue, 28 Apr 2009 20:02:51 -0300 From: Marcelo Tosatti Message-ID: <20090428230251.GA15628@amt.cnet> References: <49F7848F.7020708@web.de> <20090428224149.GA15512@amt.cnet> <49F7894B.7080103@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49F7894B.7080103@web.de> Subject: [Qemu-devel] Re: [7241] qemu: refactor main_loop (Marcelo Tosatti) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org On Wed, Apr 29, 2009 at 12:55:07AM +0200, Jan Kiszka wrote: > > host_alarm_handler writes to the notification fd (via > > qemu_event_increment), which should cause the select() to exit > > immediately, even if a pending timer was not taken into account by > > qemu_calculate_timeout(). > > Yeah, now I remember. And I always wondered why my strace logs reported > that writing to that file descriptor failed. I should have looked closer > into this immediately... (patch will follow 8) ) I started seeing VCPU_RUN fail with EBADFD, though it is not very easy to reproduce (io thread disabled): #0 0x0000003695e32215 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install SDL.x86_64 cyrus-sasl.x86_64 glibc.x86_64 gnutls.x86_64 libX11.x86_64 libXau.x86_64 libXdmcp.x86_64 libgcrypt.x86_64 libgpg-error.x86_64 libtasn1.x86_64 libxcb.x86_64 ncurses.x86_64 zlib.x86_64 (gdb) bt #0 0x0000003695e32215 in raise () from /lib64/libc.so.6 #1 0x0000003695e33d83 in abort () from /lib64/libc.so.6 #2 0x000000000041bf98 in kvm_cpu_exec (env=0xc04850) at /home/marcelo/git/qemu/kvm-all.c:508 #3 0x00000000004c403b in cpu_x86_exec (env1=) at /home/marcelo/git/qemu/cpu-exec.c:349 #4 0x000000000040cc44 in main (argc=16, argv=0x7fff5dcec948, envp=) at /home/marcelo/git/qemu/vl.c:4300 If I just ignore that EBADFD instead of aborting, the next VCPU_RUN's function properly. ?!?!? When it happens, it does _once_ during guest boot, right at udev initialization. > > Well its static. What name do you prefer (can't find a better name > > really). do_cpu_exec? > > > > Yes, it works, but it doesn't help reading the code. Also: tcg_has_work > - isn't kvm also running through this? Yes it is, i'm very bad at names. Feel free to rename them.