Skip to content
Snippets Groups Projects
  1. Dec 21, 2017
  2. Dec 20, 2017
    • Paolo Bonzini's avatar
      contrib: add systemd unit files · 2ba60ec1
      Paolo Bonzini authored
      
      This lets distros standardize on how QEMU should install systemd
      services for qemu-ga and qemu-pr-helper.
      
      The qemu-ga unit file comes from Fedora, but I checked that
      Debian is using the same path for the virtio-serisal port.
      
      I would like to include this in 2.11, so that the qemu-pr-helper
      socket can be standardized across distros.  Note however that
      the files are not installed.  We can add a configure option
      in 2.12 perhaps, but it's too late now; documenting the files
      in the release notes should do.
      
      Suggested-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20171124164422.3960-1-pbonzini@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2ba60ec1
    • Paolo Bonzini's avatar
      qemu-pr-helper: miscellaneous fixes · a4a9b6ea
      Paolo Bonzini authored
      
      1) Return a generic sense if TEST UNIT READY does not provide one;
      
      2) Fix two mistakes in copying from the spec.
      
      Cc: qemu-stable@nongnu.org
      Reported-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a4a9b6ea
    • linzhecheng's avatar
      qemu-thread: fix races on threads that exit very quickly · 68a93982
      linzhecheng authored
      If we create a thread with QEMU_THREAD_DETACHED mode, QEMU may get a segfault with low probability.
      
      The backtrace is:
         #0  0x00007f46c60291d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
         #1  0x00007f46c602a8c8 in __GI_abort () at abort.c:90
         #2  0x00000000008543c9 in PAT_abort ()
         #3  0x000000000085140d in patchIllInsHandler ()
         #4  <signal handler called>
         #5  pthread_detach (th=139933037614848) at pthread_detach.c:50
         #6  0x0000000000829759 in qemu_thread_create (thread=thread@entry=0x7ffdaa8205e0, name=name@entry=0x94d94a "io-task-worker", start_routine=start_routine@entry=0x7eb9a0 <qio_task_thread_worker>,
             arg=arg@entry=0x3f5cf70, mode=mode@entry=1) at util/qemu_thread_posix.c:512
         #7  0x00000000007ebc96 in qio_task_run_in_thread (task=0x31db2c0, worker=worker@entry=0x7e7e40 <qio_channel_socket_connect_worker>, opaque=0xcd23380, destroy=0x7f1180 <qapi_free_SocketAddress>)
             at io/task.c:141
         #8  0x00000000007e7f33 in qio_channel_socket_connect_async (ioc=ioc@entry=0x626c0b0, addr=<optimized out>, callback=callback@entry=0x55e080 <qemu_chr_socket_connected>, opaque=opaque@entry=0x42862c0,
             destroy=destroy@entry=0x0) at io/channel_socket.c:194
         #9  0x000000000055bdd1 in socket_reconnect_timeout (opaque=0x42862c0) at qemu_char.c:4744
         #10 0x00007f46c72483b3 in g_timeout_dispatch () from /usr/lib64/libglib-2.0.so.0
         #11 0x00007f46c724799a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
         #12 0x000000000076c646 in glib_pollfds_poll () at main_loop.c:228
         #13 0x000000000076c6eb in os_host_main_loop_wait (timeout=348000000) at main_loop.c:273
         #14 0x000000000076c815 in main_loop_wait (nonblocking=nonblocking@entry=0) at main_loop.c:521
         #15 0x000000000056a511 in main_loop () at vl.c:2076
         #16 0x0000000000420705 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4940
      
      The cause of this problem is a glibc bug; for more information, see
      https://sourceware.org/bugzilla/show_bug.cgi?id=19951
      
      .
      The solution for this bug is to use pthread_attr_setdetachstate.
      
      There is a similar issue with pthread_setname_np, which is moved
      from creating thread to created thread.
      
      Signed-off-by: default avatarlinzhecheng <linzhecheng@huawei.com>
      Message-Id: <20171128044656.10592-1-linzhecheng@huawei.com>
      Reviewed-by: default avatarFam Zheng <famz@redhat.com>
      [Simplify the code by removing qemu_thread_set_name, and free the arguments
       before invoking the start routine. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      68a93982
    • Paolo Bonzini's avatar
      memfd: fix configure test · 75e5b70e
      Paolo Bonzini authored
      
      Recent glibc added memfd_create in sys/mman.h.  This conflicts with
      the definition in util/memfd.c:
      
          /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
      
      Fix the configure test, and remove the sys/memfd.h inclusion since the
      file actually does not exist---it is a typo in the memfd_create(2) man
      page.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      75e5b70e
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/armbru/tags/pull-cmdline-2017-12-18-v2' into staging · 200780a3
      Peter Maydell authored
      
      Command line patches for 2017-12-18
      
      # gpg: Signature made Wed 20 Dec 2017 08:11:57 GMT
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-cmdline-2017-12-18-v2:
        option: Drop unused get_param_value(), get_next_param_value()
        option: Remove shadowing opt decl from qemu_opt_print()
        qemu-options: Belatedly document --watchdog-action inject-nmi
        qemu-options: Polish section "Character device options"
        qemu-options: Polish section "TPM device options"
        qemu-options: Add missing -iscsi Texinfo documentation
        qemu-options: Move -iscsi under "Block device options"
        qemu-options qemu-doc: Move "Device URL Syntax" to qemu-doc
        qemu-options: Fix markup of -netdev l2tpv3
        qemu-options: Remove stray colons from output of --help
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      200780a3
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · f1faf2d5
      Peter Maydell authored
      
      Pull request
      
      v2:
       * Fixed incorrect virtio_blk_data_plane_create() local_err refactoring in
         "hw/block: Use errp directly rather than local_err" that broke virtio-blk
         over virtio-mmio [Peter]
      
      # gpg: Signature made Tue 19 Dec 2017 15:08:14 GMT
      # gpg:                using RSA key 0x9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request: (23 commits)
        qemu-iotests: add 203 savevm with IOThreads test
        iothread: fix iothread_stop() race condition
        iotests: add VM.add_object()
        blockdev: add x-blockdev-set-iothread force boolean
        docs: mark nested AioContext locking as a legacy API
        block: avoid recursive AioContext acquire in bdrv_inactivate_all()
        virtio-blk: reject configs with logical block size > physical block size
        virtio-blk: make queue size configurable
        qemu-iotests: add 202 external snapshots IOThread test
        blockdev: add x-blockdev-set-iothread testing command
        iothread: add iothread_by_id() API
        block: drop unused BlockDirtyBitmapState->aio_context field
        block: don't keep AioContext acquired after internal_snapshot_prepare()
        block: don't keep AioContext acquired after blockdev_backup_prepare()
        block: don't keep AioContext acquired after drive_backup_prepare()
        block: don't keep AioContext acquired after external_snapshot_prepare()
        blockdev: hold AioContext for bdrv_unref() in external_snapshot_clean()
        qdev: drop unused #include "sysemu/iothread.h"
        dev-storage: Fix the unusual function name
        hw/block: Use errp directly rather than local_err
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      
      # Conflicts:
      #	hw/core/qdev-properties-system.c
      f1faf2d5
    • Markus Armbruster's avatar
      option: Drop unused get_param_value(), get_next_param_value() · 3e05349d
      Markus Armbruster authored
      
      Their last user went away in commit f51074cd, "pci-hotplug-old: Has
      been dead for five major releases, bury", v2.3.0.  Remove them, as new
      code should use QemuOpts or maybe keyval_parse() instead.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20171006131645.17729-1-armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      3e05349d
Loading