1. 13 11月, 2017 7 次提交
    • A
      qemu-iotests: Test I/O limits with removable media · 07615626
      Alberto Garcia 提交于
      This test hotplugs a CD drive to a VM and checks that I/O limits can
      be set only when the drive has media inserted and that they are kept
      when the media is replaced.
      
      This also tests the removal of a device with valid I/O limits set but
      no media inserted. This involves deleting and disabling the limits
      of a BlockBackend without BlockDriverState, a scenario that has been
      crashing until the fixes from the last couple of patches.
      
      [Python PEP8 fixup: "Don't use spaces are the = sign when used to
      indicate a keyword argument or a default parameter value"
      --Stefan]
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 071eb397118ed207c5a7f01d58766e415ee18d6a.1510339534.git.berto@igalia.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      07615626
    • A
      block: Leave valid throttle timers when removing a BDS from a backend · c89bcf3a
      Alberto Garcia 提交于
      If a BlockBackend has I/O limits set then its ThrottleGroupMember
      structure uses the AioContext from its attached BlockDriverState.
      Those two contexts must be kept in sync manually. This is not
      ideal and will be fixed in the future by removing the throttling
      configuration from the BlockBackend and storing it in an implicit
      filter node instead, but for now we have to live with this.
      
      When you remove the BlockDriverState from the backend then the
      throttle timers are destroyed. If a new BlockDriverState is later
      inserted then they are created again using the new AioContext.
      
      There are a couple of problems with this:
      
         a) The code manipulates the timers directly, leaving the
            ThrottleGroupMember.aio_context field in an inconsisent state.
      
         b) If you remove the I/O limits (e.g by destroying the backend)
            when the timers are gone then throttle_group_unregister_tgm()
            will attempt to destroy them again, crashing QEMU.
      
      While b) could be fixed easily by allowing the timers to be freed
      twice, this would result in a situation in which we can no longer
      guarantee that a valid ThrottleState has a valid AioContext and
      timers.
      
      This patch ensures that the timers and AioContext are always valid
      when I/O limits are set, regardless of whether the BlockBackend has a
      BlockDriverState inserted or not.
      
      [Fixed "There'a" typo as suggested by Max Reitz <mreitz@redhat.com>
      --Stefan]
      Reported-by: Nsochin jiang <sochin.jiang@huawei.com>
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: e089c66e7c20289b046d782cea4373b765c5bc1d.1510339534.git.berto@igalia.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c89bcf3a
    • A
      block: Check for inserted BlockDriverState in blk_io_limits_disable() · 48bf7ea8
      Alberto Garcia 提交于
      When you set I/O limits using block_set_io_throttle or the command
      line throttling.* options they are kept in the BlockBackend regardless
      of whether a BlockDriverState is attached to the backend or not.
      
      Therefore when removing the limits using blk_io_limits_disable() we
      need to check if there's a BDS before attempting to drain it, else it
      will crash QEMU. This can be reproduced very easily using HMP:
      
           (qemu) drive_add 0 if=none,throttling.iops-total=5000
           (qemu) drive_del none0
      Reported-by: Nsochin jiang <sochin.jiang@huawei.com>
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 0d3a67ce8d948bb33e08672564714dcfb76a3d8c.1510339534.git.berto@igalia.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      48bf7ea8
    • S
      throttle-groups: drain before detaching ThrottleState · dc868fb0
      Stefan Hajnoczi 提交于
      I/O requests hang after stop/cont commands at least since QEMU 2.10.0
      with -drive iops=100:
      
        (guest)$ dd if=/dev/zero of=/dev/vdb oflag=direct count=1000
        (qemu) stop
        (qemu) cont
        ...I/O is stuck...
      
      This happens because blk_set_aio_context() detaches the ThrottleState
      while requests may still be in flight:
      
        if (tgm->throttle_state) {
            throttle_group_detach_aio_context(tgm);
            throttle_group_attach_aio_context(tgm, new_context);
        }
      
      This patch encloses the detach/attach calls in a drained region so no
      I/O request is left hanging.  Also add assertions so we don't make the
      same mistake again in the future.
      Reported-by: NYongxue Hong <yhong@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 20171110151934.16883-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      dc868fb0
    • Z
      block: all I/O should be completed before removing throttle timers. · 632a7735
      Zhengui 提交于
      In blk_remove_bs, all I/O should be completed before removing throttle
      timers. If there has inflight I/O, removing throttle timers here will
      cause the inflight I/O never return.
      This patch add bdrv_drained_begin before throttle_timers_detach_aio_context
      to let all I/O completed before removing throttle timers.
      
      [Moved declaration of bs as suggested by Alberto Garcia
      <berto@igalia.com>.
      --Stefan]
      Signed-off-by: NZhengui <lizhengui@huawei.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 1508564040-120700-1-git-send-email-lizhengui@huawei.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      632a7735
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20171109' into staging · 508ba0f7
      Peter Maydell 提交于
      s390x changes: let pci devices start out in a usable state, and make
      RISBGN work in tcg.
      
      # gpg: Signature made Thu 09 Nov 2017 15:27:21 GMT
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20171109:
        target/s390x: Finish implementing RISBGN
        s390x/pci: let pci devices start in configured mode
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      508ba0f7
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-cap-20171109' into staging · 6b8d0ac0
      Peter Maydell 提交于
      Capstone fixes for 2.11
      
      # gpg: Signature made Thu 09 Nov 2017 07:49:25 GMT
      # gpg:                using RSA key 0x64DF38E8AF7E215F
      # 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-cap-20171109:
        Makefile: Capstone: Add support for cross compile ranlib
        disas: Dump insn bytes along with capstone disassembly
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6b8d0ac0
  2. 11 11月, 2017 2 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 53fb28d1
      Peter Maydell 提交于
      Pull request
      
      v2:
       * v1 emails 2/3 and 3/3 weren't sent due to an email failure
       * Included Sergio's updated wording in the commit description
      
      # gpg: Signature made Wed 08 Nov 2017 19:12:01 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:
        util/async: use atomic_mb_set in qemu_bh_cancel
        tests-aio-multithread: fix /aio/multi/schedule race condition
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      53fb28d1
    • P
      Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-11-08-1' into staging · 4ffa88c9
      Peter Maydell 提交于
      Merge qcrypto 2017/11/08 v1
      
      # gpg: Signature made Wed 08 Nov 2017 11:06:38 GMT
      # gpg:                using RSA key 0xBE86EBB415104FDF
      # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
      # gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
      # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF
      
      * remotes/berrange/tags/pull-qcrypto-2017-11-08-1:
        crypto: afalg: fix a NULL pointer dereference
        tests: Run the luks tests in test-crypto-block only if encryption is available
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4ffa88c9
  3. 10 11月, 2017 1 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171108' into staging · 6058bfb0
      Peter Maydell 提交于
      ppc patch queue 2017-11-08
      
      Here's the current set of accumulated ppc patches for qemu-2.11.
      Since we're now in hard freeze these are all bugfixes (although some
      fix a bug by way of a cleanup).
      
      # gpg: Signature made Wed 08 Nov 2017 08:10:38 GMT
      # gpg:                using RSA key 0x6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-2.11-20171108:
        e500: ppce500_init_mpic() return device instead of IRQ array
        hw/display/sm501: Fix comment in sm501_sysbus_class_init()
        ppc: fix setting of compat mode
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6058bfb0
  4. 09 11月, 2017 4 次提交
  5. 08 11月, 2017 8 次提交
  6. 07 11月, 2017 18 次提交