1. 20 4月, 2016 9 次提交
    • M
      block/mirror: Refresh stale bitmap iterator cache · f27a2742
      Max Reitz 提交于
      If the drive's dirty bitmap is dirtied while the mirror operation is
      running, the cache of the iterator used by the mirror code may become
      stale and not contain all dirty bits.
      
      This only becomes an issue if we are looking for contiguously dirty
      chunks on the drive. In that case, we can easily detect the discrepancy
      and just refresh the iterator if one occurs.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f27a2742
    • M
      block/mirror: Revive dead yielding code · 9c83625b
      Max Reitz 提交于
      mirror_iteration() is supposed to wait if the current chunk is subject
      to a still in-flight mirroring operation. However, it mixed checking
      this conflict situation with checking the dirty status of a chunk. A
      simplification for the latter condition (the first chunk encountered is
      always dirty) led to neglecting the former: We just skip the first chunk
      and thus never test whether it conflicts with an in-flight operation.
      
      To fix this, pull out the code which waits for in-flight operations on
      the first chunk of the range to be mirrored to settle.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9c83625b
    • P
      Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-19-tag' into staging · 4113b053
      Peter Maydell 提交于
      qemu-ga patch queue for 2.6
      
      * fixes inadvertant change that unconditionally disables qemu-ga unit test
      * fixes make check failures when building with --disable-guest-agent that
        were present visible before the unit test was inadvertantly disabled.
      
      # gpg: Signature made Tue 19 Apr 2016 23:30:09 BST using RSA key ID F108B584
      # gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
      # gpg:                 aka "Michael Roth <mdroth@utexas.edu>"
      # gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
      
      * remotes/mdroth/tags/qga-pull-2016-04-19-tag:
        qemu-ga: do not run qga test when guest agent disabled
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4113b053
    • P
      Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging · fe98b18b
      Peter Maydell 提交于
      # gpg: Signature made Tue 19 Apr 2016 17:28:01 BST using RSA key ID C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      
      * remotes/cody/tags/block-pull-request:
        block/gluster: prevent data loss after i/o error
        block/gluster: code movement of qemu_gluster_close()
        block/gluster: return correct error value
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fe98b18b
    • Y
      qemu-ga: do not run qga test when guest agent disabled · fb91f30b
      Yang Hongyang 提交于
      When configure with --disable-guest-agent, make check will fail with:
      ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL):
       Failed to execute child process "/home/xx/qemu/qemu-ga" (No such file or
      directory) (g-exec-error-quark, 8)
      make: *** [check-tests/test-qga] Error 1
      
      This check was commented out by bab47d9a. I think that was by
      mistake, because the commit message of that commit didn't mention
      this change.
      Signed-off-by: NYang Hongyang <hongyang.yang@easystack.cn>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      fb91f30b
    • P
      Update language files for QEMU 2.6.0 · 1f7685fa
      Peter Maydell 提交于
      Update translation files (change created via 'make -C po update').
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1461059023-14470-1-git-send-email-peter.maydell@linaro.org
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      1f7685fa
    • J
      block/gluster: prevent data loss after i/o error · d85fa9eb
      Jeff Cody 提交于
      Upon receiving an I/O error after an fsync, by default gluster will
      dump its cache.  However, QEMU will retry the fsync, which is especially
      useful when encountering errors such as ENOSPC when using the werror=stop
      option.  When using caching with gluster, however, the last written data
      will be lost upon encountering ENOSPC.  Using the write-behind-cache
      xlator option of 'resync-failed-syncs-after-fsync' should cause gluster
      to retain the cached data after a failed fsync, so that ENOSPC and other
      transient errors are recoverable.
      
      Unfortunately, we have no way of knowing if the
      'resync-failed-syncs-after-fsync' xlator option is supported, so for now
      close the fd and set the BDS driver to NULL upon fsync error.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      d85fa9eb
    • J
      block/gluster: code movement of qemu_gluster_close() · 5d4343e6
      Jeff Cody 提交于
      Move qemu_gluster_close() further up in the file, in preparation
      for the next patch, to avoid a forward declaration.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      5d4343e6
    • J
      block/gluster: return correct error value · a8827453
      Jeff Cody 提交于
      Upon error, gluster will call the aio callback function with a
      ret value of -1, with errno set to the proper error value.  If
      we set the acb->ret value to the return value in the callback,
      that results in every error being EPERM (i.e. 1).  Instead, set
      it to the proper error result.
      Reviewed-by: NNiels de Vos <ndevos@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      a8827453
  2. 19 4月, 2016 12 次提交
  3. 18 4月, 2016 8 次提交
    • P
      Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging · 6a6fa68a
      Peter Maydell 提交于
      Update OpenBIOS images
      
      # gpg: Signature made Mon 18 Apr 2016 09:39:31 BST using RSA key ID AE0F321F
      # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
      
      * remotes/mcayland/tags/qemu-openbios-signed:
        Update OpenBIOS images
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6a6fa68a
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.6-20160418' into staging · ba389950
      Peter Maydell 提交于
      ppc patch queue for 2-16-04-18
      
      Three bugfixe patches for 2.6 here.
      * Two for bad implementation of some of the strong load/store
        instructions
      
      * One for bad migration of the XER register.  This is a regression
        from 2.5, cause by a change in the way we represent at XER during
        runtime.
      
      # gpg: Signature made Mon 18 Apr 2016 06:17:03 BST using RSA key ID 20D9B392
      # 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: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-2.6-20160418:
        ppc: Fix migration of the XER register
        ppc: Fix the bad exception NIP value and the range check in LSWX
        ppc: Fix the range check in the LSWI instruction
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ba389950
    • P
      Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20160416' into staging · adde0204
      Peter Maydell 提交于
      seccomp branch queue
      
      # gpg: Signature made Sat 16 Apr 2016 19:58:46 BST using RSA key ID 12F8BD2F
      # gpg: Good signature from "Eduardo Otubo (Software Engineer @ ProfitBricks) <eduardo.otubo@profitbricks.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 1C96 46B6 E1D1 C38A F2EC  3FDE FD0C FF5B 12F8 BD2F
      
      * remotes/otubo/tags/pull-seccomp-20160416:
        seccomp: adding sysinfo system call to whitelist
        seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3
        configure: Enable seccomp sandbox for MIPS
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      adde0204
    • P
      Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20160415' into staging · c6c598ca
      Peter Maydell 提交于
      wxx patch queue
      
      # gpg: Signature made Fri 15 Apr 2016 18:36:41 BST using RSA key ID 677450AD
      # gpg: Good signature from "Stefan Weil <sw@weilnetz.de>"
      # gpg:                 aka "Stefan Weil <stefan.weil@weilnetz.de>"
      # gpg:                 aka "Stefan Weil <stefan.weil@bib.uni-mannheim.de>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 4923 6FEA 75C9 5D69 8EC2  B78A E08C 21D5 6774 50AD
      
      * remotes/weil/tags/pull-wxx-20160415:
        wxx: Fix broken TCP networking (regression)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c6c598ca
    • M
      Update OpenBIOS images · afc47486
      Mark Cave-Ayland 提交于
      Update OpenBIOS images to SVN r1395 built from submodule.
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      afc47486
    • T
      ppc: Fix migration of the XER register · aa378598
      Thomas Huth 提交于
      env->xer only holds the lower bits of the XER register nowadays, the
      SO, OV and CA bits are stored in separate variables (see the function
      cpu_write_xer() for details). Since the migration code currently only
      reads the "xer" variable, the upper bits are lost during migration.
      Fix it by using cpu_read_xer() instead.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      aa378598
    • T
      ppc: Fix the bad exception NIP value and the range check in LSWX · 537d3e8e
      Thomas Huth 提交于
      The range checks in the LSWX instruction are completely insufficient:
      They do not take the wrap-around case into account, and the check
      "reg < rx" should be "reg <= rx" instead. Fix it by using the new
      lsw_reg_in_range() helper function that is already used for LSWI, too.
      
      Then there is a second problem: In case the INVAL exception is generated,
      the NIP value is wrong, it currently points to the instruction before
      the LSWX instruction. This is because gen_lswx() already decreases the
      NIP value by 4 (to be prepared for page fault exceptions), and
      powerpc_excp() later decreases it again by 4 while handling the program
      exception. So to get this right, we've got to undo the "- 4" from
      gen_lswx() here before calling helper_raise_exception_err().
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      537d3e8e
    • T
      ppc: Fix the range check in the LSWI instruction · afbee712
      Thomas Huth 提交于
      There are two issues: First, the number of registers that are used has
      to be calculated with "(nb + 3) / 4" (i.e. round always up, not down).
      Second, the "start <= ra && (start + nr - 32) > ra" condition for the
      wrap-around case is wrong: It has to be tested with "||" instead of "&&".
      Since we can reuse this check later for the LSWX instruction, let's
      place the fixed code into a helper function, too.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      afbee712
  4. 17 4月, 2016 3 次提交
  5. 16 4月, 2016 3 次提交
  6. 15 4月, 2016 5 次提交
    • K
      Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-15' into queue-block · cdc88453
      Kevin Wolf 提交于
      Block patches for 2.6.0-rc3.
      
      # gpg: Signature made Fri Apr 15 17:57:30 2016 CEST using RSA key ID E838ACAD
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
      
      * mreitz/tags/pull-block-for-kevin-2016-04-15:
        nbd: Don't kill server on client that doesn't request TLS
        nbd: fix assert() on qemu-nbd stop
        nbd: Don't fail handshake on NBD_OPT_LIST descriptions
        qemu-iotests: 041: More robust assertion on quorum node
        qemu-iotests: place valgrind log file in scratch dir
        qemu-iotests: tests: do not set unused tmp variable
        qemu-iotests: common.rc: drop unused _do()
        qemu-iotests: drop unused _within_tolerance() filter
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      cdc88453
    • E
      nbd: Don't kill server on client that doesn't request TLS · d1129a8a
      Eric Blake 提交于
      Upstream NBD documents (as of commit 4feebc95) that servers MAY
      choose to operate in a conditional mode, where it is up to the
      client whether to use TLS.  For qemu's case, we want to always be
      in FORCEDTLS mode, because of the risk of man-in-the-middle
      attacks, and since we never export more than one device; likewise,
      the qemu client will ALWAYS send NBD_OPT_STARTTLS as its first
      option.  But now that SELECTIVETLS servers exist, it is feasible
      to encounter a (non-qemu) client that is programmed to talk to
      such a server, and does not do NBD_OPT_STARTTLS first, but rather
      wants to probe if it can use a non-encrypted export.
      
      The NBD protocol documents that we should let such a client
      continue trying, on the grounds that maybe the client will get the
      hint to send NBD_OPT_STARTTLS, rather than immediately dropping
      the connection.
      
      Note that NBD_OPT_EXPORT_NAME is a special case: since it is the
      only option request that can't have an error return, we have to
      (continue to) drop the connection on that one; rather, what we are
      fixing here is that all other replies prior to TLS initiation tell
      the client NBD_REP_ERR_TLS_REQD, but keep the connection alive.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-id: 1460671343-18485-1-git-send-email-eblake@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      d1129a8a
    • P
      nbd: fix assert() on qemu-nbd stop · 23994a5f
      Pavel Butsykin 提交于
      From time to time qemu-nbd is crashing on the following assert:
          assert(state == TERMINATING);
          nbd_export_closed
          nbd_export_put
          main
      and the state at the moment of the crash is evaluated to TERMINATE.
      
      During shutdown process of the client the nbd_client_thread thread sends
      SIGTERM signal and the main thread calls the nbd_client_closed callback.
      If the SIGTERM callback will be executed after change the state to
      TERMINATING, then the state will once again be TERMINATE.
      
      To solve the issue, we must change the state to TERMINATE only if the state
      is RUNNING. In the other case we are shutting down already.
      Signed-off-by: NPavel Butsykin <pbutsykin@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Message-id: 1460629215-11567-1-git-send-email-den@openvz.org
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      23994a5f
    • E
      nbd: Don't fail handshake on NBD_OPT_LIST descriptions · 200650d4
      Eric Blake 提交于
      The NBD Protocol states that NBD_REP_SERVER may set
      'length > sizeof(namelen) + namelen'; in which case the rest
      of the packet is a UTF-8 description of the export.  While we
      don't know of any NBD servers that send this description yet,
      we had better consume the data so we don't choke when we start
      to talk to such a server.
      
      Also, a (buggy/malicious) server that replies with length <
      sizeof(namelen) would cause us to block waiting for bytes that
      the server is not sending, and one that replies with super-huge
      lengths could cause us to temporarily allocate up to 4G memory.
      Sanity check things before blindly reading incorrectly.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-id: 1460077777-31004-1-git-send-email-eblake@redhat.com
      Reviewed-by: NAlex Bligh <alex@alex.org.uk>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      200650d4
    • F
      qemu-iotests: 041: More robust assertion on quorum node · e71fc0ba
      Fam Zheng 提交于
      Block nodes are now assigned names automatically, therefore the test
      case is fragile in using fixed indices in result. Introduce a method in
      iotests.py and do the matching more sensibly.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1460518995-1338-1-git-send-email-famz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      e71fc0ba