1. 27 3月, 2018 4 次提交
    • S
      coroutine: avoid co_queue_wakeup recursion · c40a2545
      Stefan Hajnoczi 提交于
      qemu_aio_coroutine_enter() is (indirectly) called recursively when
      processing co_queue_wakeup.  This can lead to stack exhaustion.
      
      This patch rewrites co_queue_wakeup in an iterative fashion (instead of
      recursive) with bounded memory usage to prevent stack exhaustion.
      
      qemu_co_queue_run_restart() is inlined into qemu_aio_coroutine_enter()
      and the qemu_coroutine_enter() call is turned into a loop to avoid
      recursion.
      
      There is one change that is worth mentioning:  Previously, when
      coroutine A queued coroutine B, qemu_co_queue_run_restart() entered
      coroutine B from coroutine A.  If A was terminating then it would still
      stay alive until B yielded.  After this patch B is entered by A's parent
      so that a A can be deleted immediately if it is terminating.
      
      It is safe to make this change since B could never interact with A if it
      was terminating anyway.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20180322152834.12656-3-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c40a2545
    • S
      queue: add QSIMPLEQ_PREPEND() · 67a74148
      Stefan Hajnoczi 提交于
      QSIMPLEQ_CONCAT(a, b) joins a = a + b.  The new QSIMPLEQ_PREPEND(a, b)
      API joins a = b + a.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20180322152834.12656-2-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      67a74148
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-dt-20180326' into staging · f58d9620
      Peter Maydell 提交于
      Fix a decodetree problem with 16-bit insns
      
      # gpg: Signature made Mon 26 Mar 2018 15:35:04 BST
      # gpg:                using RSA key 64DF38E8AF7E215F
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * remotes/rth/tags/pull-dt-20180326:
        scripts/decodetree: Fix insnmask not marked as global in main()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f58d9620
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 62a2b55e
      Peter Maydell 提交于
      Block layer patches
      
      # gpg: Signature made Mon 26 Mar 2018 15:33:01 BST
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream:
        qemu-iotests: Test vhdx image creation with QMP
        vhdx: Check for 4 GB maximum log size on creation
        vhdx: Don't use error_setg_errno() with constant errno
        vhdx: Require power-of-two block size on create
        qemu-iotests: Test parallels image creation with QMP
        parallels: Check maximum cluster size on create
        qemu-iotests: Test invalid resize on luks
        luks: Turn another invalid assertion into check
        qemu-iotests: Enable 025 for luks
        qemu-iotests: Test vdi image creation with QMP
        vdi: Fix build with CONFIG_VDI_DEBUG
        vdi: Change 'static' create option to 'preallocation' in QMP
        qcow2: Reset free_cluster_index when allocating a new refcount block
        include/block/block_int: Document protocol related functions
        block/blkreplay: Remove protocol-related fields
        block/throttle: Remove protocol-related fields
        block/quorum: Remove protocol-related fields
        block/replication: Remove protocol_name field
        iotests: 163 is not quick
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      62a2b55e
  2. 26 3月, 2018 36 次提交