1. 30 9月, 2016 2 次提交
  2. 29 9月, 2016 7 次提交
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · c640f284
      Peter Maydell 提交于
      * thread-safe tb_flush (Fred, Alex, Sergey, me, Richard, Emilio,... :-)
      * license clarification for compiler.h (Felipe)
      * glib cflags improvement (Marc-André)
      * checkpatch silencing (Paolo)
      * SMRAM migration fix (Paolo)
      * Replay improvements (Pavel)
      * IOMMU notifier improvements (Peter)
      * IOAPIC now defaults to version 0x20 (Peter)
      
      # gpg: Signature made Tue 27 Sep 2016 10:57:40 BST
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (28 commits)
        replay: allow replay stopping and restarting
        replay: vmstate for replay module
        replay: move internal data to the structure
        cpus-common: lock-free fast path for cpu_exec_start/end
        tcg: Make tb_flush() thread safe
        cpus-common: Introduce async_safe_run_on_cpu()
        cpus-common: simplify locking for start_exclusive/end_exclusive
        cpus-common: remove redundant call to exclusive_idle()
        cpus-common: always defer async_run_on_cpu work items
        docs: include formal model for TCG exclusive sections
        cpus-common: move exclusive work infrastructure from linux-user
        cpus-common: fix uninitialized variable use in run_on_cpu
        cpus-common: move CPU work item management to common code
        cpus-common: move CPU list management to common code
        linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick()
        linux-user: Use QemuMutex and QemuCond
        cpus: Rename flush_queued_work()
        cpus: Move common code out of {async_, }run_on_cpu()
        cpus: pass CPUState to run_on_cpu helpers
        build-sys: put glib_cflags in QEMU_CFLAGS
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c640f284
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · bc63afaf
      Peter Maydell 提交于
      # gpg: Signature made Wed 28 Sep 2016 19:15:22 BST
      # 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:
        linux-aio: fix re-entrant completion processing
        test-coroutine: test qemu_coroutine_entered()
        coroutine: add qemu_coroutine_entered() function
        libqos: fix qvring_init()
        iothread: check iothread->ctx before aio_context_unref to avoid assertion
        aio-posix: avoid unnecessary aio_epoll_enabled() calls
        block: mirror: fix wrong comment of mirror_start
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      bc63afaf
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20160928-1' into staging · 4af27939
      Peter Maydell 提交于
      input queue: ps2 kbd cleanups and improvements
      
      # gpg: Signature made Wed 28 Sep 2016 13:52:16 BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/pull-input-20160928-1:
        ps2: do not generate invalid key codes for unknown keys
        ps2: use QEMU qcodes instead of scancodes
        ps2: allow keycode translation for all scancode sets
        ps2: correctly handle 'get/set scancode' command
        ps2: reject unknown commands, instead of blindly accepting them
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4af27939
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160928-1' into staging · 79907e68
      Peter Maydell 提交于
      ui: console+vnc fixes, switch spice to pure opengl with gl=on.
      
      # gpg: Signature made Wed 28 Sep 2016 11:57:35 BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/pull-ui-20160928-1:
        ui/vnc-enc-tight: remove switch and have single return
        spice/gl: render DisplaySurface via opengl
        console: track gl_block state in QemuConsole
        console: skip same-size resize
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      79907e68
    • S
      linux-aio: fix re-entrant completion processing · fe121b9d
      Stefan Hajnoczi 提交于
      Commit 0ed93d84 ("linux-aio: process
      completions from ioq_submit()") added an optimization that processes
      completions each time ioq_submit() returns with requests in flight.
      This commit introduces a "Co-routine re-entered recursively" error which
      can be triggered with -drive format=qcow2,aio=native.
      
      Fam Zheng <famz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, and I
      debugged the following backtrace:
      
        (gdb) bt
        #0  0x00007ffff0a046f5 in raise () at /lib64/libc.so.6
        #1  0x00007ffff0a062fa in abort () at /lib64/libc.so.6
        #2  0x0000555555ac0013 in qemu_coroutine_enter (co=0x5555583464d0) at util/qemu-coroutine.c:113
        #3  0x0000555555a4b663 in qemu_laio_process_completions (s=s@entry=0x555557e2f7f0) at block/linux-aio.c:218
        #4  0x0000555555a4b874 in ioq_submit (s=s@entry=0x555557e2f7f0) at block/linux-aio.c:331
        #5  0x0000555555a4ba12 in laio_do_submit (fd=fd@entry=13, laiocb=laiocb@entry=0x555559d38ae0, offset=offset@entry=2932727808, type=type@entry=1) at block/linux-aio.c:383
        #6  0x0000555555a4bbd3 in laio_co_submit (bs=<optimized out>, s=0x555557e2f7f0, fd=13, offset=2932727808, qiov=0x555559d38e20, type=1) at block/linux-aio.c:402
        #7  0x0000555555a4fd23 in bdrv_driver_preadv (bs=bs@entry=0x55555663bcb0, offset=offset@entry=2932727808, bytes=bytes@entry=8192, qiov=qiov@entry=0x555559d38e20, flags=0) at block/io.c:804
        #8  0x0000555555a52b34 in bdrv_aligned_preadv (bs=bs@entry=0x55555663bcb0, req=req@entry=0x555559d38d20, offset=offset@entry=2932727808, bytes=bytes@entry=8192, align=align@entry=512, qiov=qiov@entry=0x555559d38e20, flags=0) at block/io.c:1041
        #9  0x0000555555a52db8 in bdrv_co_preadv (child=<optimized out>, offset=2932727808, bytes=8192, qiov=qiov@entry=0x555559d38e20, flags=flags@entry=0) at block/io.c:1133
        #10 0x0000555555a29629 in qcow2_co_preadv (bs=0x555556635890, offset=6178725888, bytes=8192, qiov=0x555557527840, flags=<optimized out>) at block/qcow2.c:1509
        #11 0x0000555555a4fd23 in bdrv_driver_preadv (bs=bs@entry=0x555556635890, offset=offset@entry=6178725888, bytes=bytes@entry=8192, qiov=qiov@entry=0x555557527840, flags=0) at block/io.c:804
        #12 0x0000555555a52b34 in bdrv_aligned_preadv (bs=bs@entry=0x555556635890, req=req@entry=0x555559d39000, offset=offset@entry=6178725888, bytes=bytes@entry=8192, align=align@entry=1, qiov=qiov@entry=0x555557527840, flags=0) at block/io.c:1041
        #13 0x0000555555a52db8 in bdrv_co_preadv (child=<optimized out>, offset=offset@entry=6178725888, bytes=bytes@entry=8192, qiov=qiov@entry=0x555557527840, flags=flags@entry=0) at block/io.c:1133
        #14 0x0000555555a4515a in blk_co_preadv (blk=0x5555566356d0, offset=6178725888, bytes=8192, qiov=0x555557527840, flags=0) at block/block-backend.c:783
        #15 0x0000555555a45266 in blk_aio_read_entry (opaque=0x5555577025e0) at block/block-backend.c:991
        #16 0x0000555555ac0cfa in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at util/coroutine-ucontext.c:78
      
      It turned out that re-entrant ioq_submit() and completion processing
      between three requests caused this error.  The following check is not
      sufficient to prevent recursively entering coroutines:
      
        if (laiocb->co != qemu_coroutine_self()) {
            qemu_coroutine_enter(laiocb->co);
        }
      
      As the following coroutine backtrace shows, not just the current
      coroutine (self) can be entered.  There might also be other coroutines
      that are currently entered and transferred control due to the qcow2 lock
      (CoMutex):
      
        (gdb) qemu coroutine 0x5555583464d0
        #0  0x0000555555ac0c90 in qemu_coroutine_switch (from_=from_@entry=0x5555583464d0, to_=to_@entry=0x5555572f9890, action=action@entry=COROUTINE_ENTER) at util/coroutine-ucontext.c:175
        #1  0x0000555555abfe54 in qemu_coroutine_enter (co=0x5555572f9890) at util/qemu-coroutine.c:117
        #2  0x0000555555ac031c in qemu_co_queue_run_restart (co=co@entry=0x5555583462c0) at util/qemu-coroutine-lock.c:60
        #3  0x0000555555abfe5e in qemu_coroutine_enter (co=0x5555583462c0) at util/qemu-coroutine.c:119
        #4  0x0000555555a4b663 in qemu_laio_process_completions (s=s@entry=0x555557e2f7f0) at block/linux-aio.c:218
        #5  0x0000555555a4b874 in ioq_submit (s=s@entry=0x555557e2f7f0) at block/linux-aio.c:331
        #6  0x0000555555a4ba12 in laio_do_submit (fd=fd@entry=13, laiocb=laiocb@entry=0x55555a338b40, offset=offset@entry=2911477760, type=type@entry=1) at block/linux-aio.c:383
        #7  0x0000555555a4bbd3 in laio_co_submit (bs=<optimized out>, s=0x555557e2f7f0, fd=13, offset=2911477760, qiov=0x55555a338e80, type=1) at block/linux-aio.c:402
        #8  0x0000555555a4fd23 in bdrv_driver_preadv (bs=bs@entry=0x55555663bcb0, offset=offset@entry=2911477760, bytes=bytes@entry=8192, qiov=qiov@entry=0x55555a338e80, flags=0) at block/io.c:804
        #9  0x0000555555a52b34 in bdrv_aligned_preadv (bs=bs@entry=0x55555663bcb0, req=req@entry=0x55555a338d80, offset=offset@entry=2911477760, bytes=bytes@entry=8192, align=align@entry=512, qiov=qiov@entry=0x55555a338e80, flags=0) at block/io.c:1041
        #10 0x0000555555a52db8 in bdrv_co_preadv (child=<optimized out>, offset=2911477760, bytes=8192, qiov=qiov@entry=0x55555a338e80, flags=flags@entry=0) at block/io.c:1133
        #11 0x0000555555a29629 in qcow2_co_preadv (bs=0x555556635890, offset=6157475840, bytes=8192, qiov=0x5555575df720, flags=<optimized out>) at block/qcow2.c:1509
        #12 0x0000555555a4fd23 in bdrv_driver_preadv (bs=bs@entry=0x555556635890, offset=offset@entry=6157475840, bytes=bytes@entry=8192, qiov=qiov@entry=0x5555575df720, flags=0) at block/io.c:804
        #13 0x0000555555a52b34 in bdrv_aligned_preadv (bs=bs@entry=0x555556635890, req=req@entry=0x55555a339060, offset=offset@entry=6157475840, bytes=bytes@entry=8192, align=align@entry=1, qiov=qiov@entry=0x5555575df720, flags=0) at block/io.c:1041
        #14 0x0000555555a52db8 in bdrv_co_preadv (child=<optimized out>, offset=offset@entry=6157475840, bytes=bytes@entry=8192, qiov=qiov@entry=0x5555575df720, flags=flags@entry=0) at block/io.c:1133
        #15 0x0000555555a4515a in blk_co_preadv (blk=0x5555566356d0, offset=6157475840, bytes=8192, qiov=0x5555575df720, flags=0) at block/block-backend.c:783
        #16 0x0000555555a45266 in blk_aio_read_entry (opaque=0x555557231aa0) at block/block-backend.c:991
        #17 0x0000555555ac0cfa in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at util/coroutine-ucontext.c:78
      
      Use the new qemu_coroutine_entered() function instead of comparing
      against qemu_coroutine_self().  This is correct because:
      
      1. If a coroutine is not entered then it must have yielded to wait for
         I/O completion.  It is therefore safe to enter.
      
      2. If a coroutine is entered then it must be in
         ioq_submit()/qemu_laio_process_completions() because otherwise it
         would be yielded while waiting for I/O completion.  Therefore it will
         check laio->ret and return from ioq_submit() instead of yielding,
         i.e. it's guaranteed not to hang.
      Reported-by: NFam Zheng <famz@redhat.com>
      Tested-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 1474989516-18255-4-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fe121b9d
    • S
      test-coroutine: test qemu_coroutine_entered() · afe16f3f
      Stefan Hajnoczi 提交于
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 1474989516-18255-3-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      afe16f3f
    • S
      coroutine: add qemu_coroutine_entered() function · f643e469
      Stefan Hajnoczi 提交于
      See the doc comments for a description of this new coroutine API.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 1474989516-18255-2-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f643e469
  3. 28 9月, 2016 31 次提交