[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [7241] qemu: refactor main_loop (Marcelo Tosatti)
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] Re: [7241] qemu: refactor main_loop (Marcelo Tosatti) |
Date: |
Tue, 28 Apr 2009 20:02:51 -0300 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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.