1. 04 6月, 2019 6 次提交
    • V
      block: avoid recursive block_status call if possible · 69f47505
      Vladimir Sementsov-Ogievskiy 提交于
      drv_co_block_status digs bs->file for additional, more accurate search
      for hole inside region, reported as DATA by bs since 5daa74a6.
      
      This accuracy is not free: assume we have qcow2 disk. Actually, qcow2
      knows, where are holes and where is data. But every block_status
      request calls lseek additionally. Assume a big disk, full of
      data, in any iterative copying block job (or img convert) we'll call
      lseek(HOLE) on every iteration, and each of these lseeks will have to
      iterate through all metadata up to the end of file. It's obviously
      ineffective behavior. And for many scenarios we don't need this lseek
      at all.
      
      However, lseek is needed when we have metadata-preallocated image.
      
      So, let's detect metadata-preallocation case and don't dig qcow2's
      protocol file in other cases.
      
      The idea is to compare allocation size in POV of filesystem with
      allocations size in POV of Qcow2 (by refcounts). If allocation in fs is
      significantly lower, consider it as metadata-preallocation case.
      
      102 iotest changed, as our detector can't detect shrinked file as
      metadata-preallocation, which don't seem to be wrong, as with metadata
      preallocation we always have valid file length.
      
      Two other iotests have a slight change in their QMP output sequence:
      Active 'block-commit' returns earlier because the job coroutine yields
      earlier on a blocking operation. This operation is loading the refcount
      blocks in qcow2_detect_metadata_preallocation().
      Suggested-by: NDenis V. Lunev <den@openvz.org>
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      69f47505
    • V
      tests/perf: Test lseek influence on qcow2 block-status · 52f2b896
      Vladimir Sementsov-Ogievskiy 提交于
      Block layer may recursively check block_status in file child of qcow2,
      if qcow2 driver returned DATA. There are several test cases to check
      influence of lseek on block_status performance. To see real difference
      run on tmpfs.
      
      Tests originally created by Kevin, I just refactored and put them
      together into one executable file with simple output.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      52f2b896
    • J
      blockdev: fix missed target unref for drive-backup · 4da26f13
      John Snow 提交于
      If the bitmap can't be used for whatever reason, we skip putting down
      the reference. Fix that.
      
      In practice, this means that if you attempt to gracefully exit QEMU
      after a backup command being rejected, bdrv_close_all will fail and
      tell you some unpleasant things via assert().
      Reported-by: Naihua liang <aliang@redhat.com>
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1703916Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4da26f13
    • K
      iotests: Test commit job start with concurrent I/O · ac6fb43e
      Kevin Wolf 提交于
      This tests that concurrent requests are correctly drained before making
      graph modifications instead of running into assertions in
      bdrv_replace_node().
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      ac6fb43e
    • K
      block: Drain source node in bdrv_replace_node() · f871abd6
      Kevin Wolf 提交于
      Instead of just asserting that no requests are in flight in
      bdrv_replace_node(), which is a requirement that most callers ignore, we
      can just drain the source node right there. This fixes at least starting
      a commit job while I/O is active on the backing chain, but probably
      other callers, too.
      
      Having requests in flight on the target node isn't a problem because the
      target just gets new parents, but the call path of running requests
      isn't modified. So we can just drop this assertion without a replacement.
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1711643Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      f871abd6
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · e2a58ff4
      Peter Maydell 提交于
      * Revert q35 to kernel irqchip (Alex)
      * edu device fixes (Li Qiang)
      * cleanups (Marc-André, Peter)
      * Improvements to -accel help
      * Better support for IA32_MISC_ENABLE MSR (Wanpeng)
      * I2C test conversion to qgraph (Paolo)
      
      # gpg: Signature made Mon 03 Jun 2019 14:20:12 BST
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
      # 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: (24 commits)
        q35: Revert to kernel irqchip
        configure: remove tpm_passthrough & tpm_emulator
        ci: store Patchew configuration in the tree
        libqos: i2c: move address into QI2CDevice
        tests: convert ds1338-test to qtest
        tests: convert OMAP i2c tests to qgraph
        libqos: add ARM imx25-pdk machine object
        libqos: add ARM n800 machine object
        libqos: convert I2C to qgraph
        libqos: split I2CAdapter initialization and allocation
        imx25-pdk: create ds1338 for qtest inside the test
        pca9552-test: do not rely on state across tests
        libqos: fix omap-i2c receiving more than 4 bytes
        libqos: move common i2c code to libqos
        qgraph: fix qos_node_contains with options
        qgraph: allow extra_device_opts on contains nodes
        edu: uses uint64_t in dma operation
        edu: mmio: allow 64-bit access in read dispatch
        edu: mmio: allow 64-bit access
        i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitor
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e2a58ff4
  2. 03 6月, 2019 25 次提交
  3. 02 6月, 2019 8 次提交
  4. 30 5月, 2019 1 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.1-20190529' into staging · 60905286
      Peter Maydell 提交于
      ppc patch queue 2019-05-29
      
      Next pull request against qemu-4.1.  Highlights:
        * KVM accelerated support for the XIVE interrupt controller in PAPR
          guests
        * A number of TCG vector fixes
        * Fixes for the PReP / 40p machine
        * Improvements to make check-tcg test coverage
      
      Other than that it's just a bunch of assorted fixes, cleanups and
      minor improvements.
      
      This supersedes both the pull request dated 2019-05-21 and the one
      dated 2019-05-22.  I've dropped one hunk which I think may have caused
      the check-tcg failure that Peter saw (by enabling the ppc64abi32
      build, which I think has been broken for ages).  I'm not entirely
      certain, since I haven't reproduced exactly the same failure.
      
      # gpg: Signature made Wed 29 May 2019 07:49:04 BST
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-4.1-20190529: (44 commits)
        ppc/pnv: add dummy XSCOM registers for PRD initialization
        ppc/pnv: introduce new skiboot platform properties
        spapr: Don't migrate the hpt_maxpagesize cap to older machine types
        spapr: change default interrupt mode to 'dual'
        spapr/xive: fix multiple resets when using the 'dual' interrupt mode
        docs: provide documentation on the POWER9 XIVE interrupt controller
        spapr/irq: add KVM support to the 'dual' machine
        ppc/xics: fix irq priority in ics_set_irq_type()
        spapr/irq: initialize the IRQ device only once
        spapr/irq: introduce a spapr_irq_init_device() helper
        spapr: check for the activation of the KVM IRQ device
        spapr: introduce routines to delete the KVM IRQ device
        sysbus: add a sysbus_mmio_unmap() helper
        spapr/xive: activate KVM support
        spapr/xive: add migration support for KVM
        spapr/xive: introduce a VM state change handler
        spapr/xive: add state synchronization with KVM
        spapr/xive: add hcall support when under KVM
        spapr/xive: add KVM support
        spapr: Print out extra hints when CAS negotiation of interrupt mode fails
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      60905286