|
From: | Oliver Francke |
Subject: | Re: [Qemu-devel] [PATCH] vl: take iothread lock very early |
Date: | Tue, 03 Mar 2015 17:03:39 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi all, just brief, this small one breaks my qemu-system-x86_64 with: qemu: qemu_cond_wait: Operation not permitted My most complete qemu-starter:/usr/local/qemu-2.3.0/bin/qemu-system-x86_64 -daemonize -usbdevice tablet -enable-kvm -pidfile /var/run/qemu-server/3371.pid -monitor unix:/var/run/qemu-server/3371.mon,server,nowait -vnc unix:/var/run/qemu-server/3371.vnc,password -qmp unix:/var/run/qemu-server/3371.qmp,server,nowait -nodefaults -serial none -parallel none -device rtl8139,mac=00:F1:70:00:D2:B0,netdev=vlan0d0 -netdev type=tap,id=vlan0d0,ifname=tap3371i0d0,script=/etc/fcms/add_if.sh,downscript=/etc/fcms/downscript.sh -name 1155823384-7 -vga cirrus -k de -smp sockets=1,cores=1 -m 512 -device virtio-blk-pci,drive=virtio0 -drive format=raw,file=rbd:4/vm-3371-disk-1.rbd:rbd_cache=true:rbd_cache_size=16777216:rbd_cache_max_dirty=12582912:rbd_cache_target_dirty=8388608,cache=writeback,if=none,id=virtio0,media=disk,index=0 -drive format=raw,file=rbd:4/vm-3371-swap-1.rbd:rbd_cache=true:rbd_cache_size=16777216:rbd_cache_max_dirty=12582912:rbd_cache_target_dirty=8388608,cache=writeback,if=virtio,media=disk,index=1 -drive if=ide,media=cdrom,id=ide1-cd0,readonly=on -drive if=ide,media=cdrom,id=ide1-cd1,readonly=on -boot order=dc
Up to the former commit everything works well as expected. Hope it helps, Oliver. On 03/03/2015 11:36 AM, Paolo Bonzini wrote:
If the iothread lock isn't taken by the main thread, the RCU callbacks might run concurrently with the main thread. QEMU's not ready for that. Signed-off-by: Paolo Bonzini <address@hidden> --- vl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 09693f5..d743727 100644 --- a/vl.c +++ b/vl.c @@ -2763,6 +2763,9 @@ int main(int argc, char **argv, char **envp) FILE *vmstate_dump_file = NULL; Error *main_loop_err = NULL;+ qemu_init_cpu_loop();+ qemu_mutex_lock_iothread(); + atexit(qemu_run_exit_notifiers); error_set_progname(argv[0]); qemu_init_exec_dir(argv[0]); @@ -4098,9 +4101,6 @@ int main(int argc, char **argv, char **envp)os_set_line_buffering(); - qemu_init_cpu_loop();- qemu_mutex_lock_iothread(); - #ifdef CONFIG_SPICE /* spice needs the timers to be initialized by this point */ qemu_spice_init();
-- Oliver Francke filoo GmbH Moltkestraße 25a 33330 Gütersloh HRB4355 AG Gütersloh Geschäftsführer: J.Rehpöhler | C.Kunz Folgen Sie uns auf Twitter: http://twitter.com/filoogmbh
[Prev in Thread] | Current Thread | [Next in Thread] |