qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [7241] qemu: refactor main_loop (Marcelo Tosatti)
Date: Tue, 28 Apr 2009 20:02:51 -0300	[thread overview]
Message-ID: <20090428230251.GA15628@amt.cnet> (raw)
In-Reply-To: <49F7894B.7080103@web.de>

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=<value optimized out>)
    at /home/marcelo/git/qemu/cpu-exec.c:349
#4  0x000000000040cc44 in main (argc=16, argv=0x7fff5dcec948, 
    envp=<value optimized out>) 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.

  reply	other threads:[~2009-04-28 23:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24 18:03 [Qemu-devel] [7241] qemu: refactor main_loop (Marcelo Tosatti) Anthony Liguori
2009-04-28 22:34 ` [Qemu-devel] " Jan Kiszka
2009-04-28 22:41   ` Marcelo Tosatti
2009-04-28 22:55     ` Jan Kiszka
2009-04-28 23:02       ` Marcelo Tosatti [this message]
2009-04-29  7:18         ` Gerd Hoffmann
2009-04-29  7:54           ` Jan Kiszka
2009-04-29  9:47             ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090428230251.GA15628@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).