1. 29 11月, 2016 1 次提交
  2. 24 11月, 2016 1 次提交
  3. 23 11月, 2016 9 次提交
  4. 22 11月, 2016 8 次提交
    • E
      block: Pass unaligned discard requests to drivers · 3482b9bc
      Eric Blake 提交于
      Discard is advisory, so rounding the requests to alignment
      boundaries is never semantically wrong from the data that
      the guest sees.  But at least the Dell Equallogic iSCSI SANs
      has an interesting property that its advertised discard
      alignment is 15M, yet documents that discarding a sequence
      of 1M slices will eventually result in the 15M page being
      marked as discarded, and it is possible to observe which
      pages have been discarded.
      
      Between commits 9f1963b3 and b8d0a980, we converted the block
      layer to a byte-based interface that ultimately ignores any
      unaligned head or tail based on the driver's advertised
      discard granularity, which means that qemu 2.7 refuses to
      pass any discard request smaller than 15M down to the Dell
      Equallogic hardware.  This is a slight regression in behavior
      compared to earlier qemu, where a guest executing discards
      in power-of-2 chunks used to be able to get every page
      discarded, but is now left with various pages still allocated
      because the guest requests did not align with the hardware's
      15M pages.
      
      Since the SCSI specification says nothing about a minimum
      discard granularity, and only documents the preferred
      alignment, it is best if the block layer gives the driver
      every bit of information about discard requests, rather than
      rounding it to alignment boundaries early.
      
      Rework the block layer discard algorithm to mirror the write
      zero algorithm: always peel off any unaligned head or tail
      and manage that in isolation, then do the bulk of the request
      on an aligned boundary.  The fallback when the driver returns
      -ENOTSUP for an unaligned request is to silently ignore that
      portion of the discard request; but for devices that can pass
      the partial request all the way down to hardware, this can
      result in the hardware coalescing requests and discarding
      aligned pages after all.
      
      Reported by: Peter Lieven <pl@kamp.de>
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3482b9bc
    • E
      block: Return -ENOTSUP rather than assert on unaligned discards · 49228d1e
      Eric Blake 提交于
      Right now, the block layer rounds discard requests, so that
      individual drivers are able to assert that discard requests
      will never be unaligned.  But there are some ISCSI devices
      that track and coalesce multiple unaligned requests, turning it
      into an actual discard if the requests eventually cover an
      entire page, which implies that it is better to always pass
      discard requests as low down the stack as possible.
      
      In isolation, this patch has no semantic effect, since the
      block layer currently never passes an unaligned request through.
      But the block layer already has code that silently ignores
      drivers that return -ENOTSUP for a discard request that cannot
      be honored (as well as drivers that return 0 even when nothing
      was done).  But the next patch will update the block layer to
      fragment discard requests, so that clients are guaranteed that
      they are either dealing with an unaligned head or tail, or an
      aligned core, making it similar to the block layer semantics of
      write zero fragmentation.
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      49228d1e
    • E
      block: Let write zeroes fallback work even with small max_transfer · b2f95fee
      Eric Blake 提交于
      Commit 443668ca rewrote the write_zeroes logic to guarantee that
      an unaligned request never crosses a cluster boundary.  But
      in the rewrite, the new code assumed that at most one iteration
      would be needed to get to an alignment boundary.
      
      However, it is easy to trigger an assertion failure: the Linux
      kernel limits loopback devices to advertise a max_transfer of
      only 64k.  Any operation that requires falling back to writes
      rather than more efficient zeroing must obey max_transfer during
      that fallback, which means an unaligned head may require multiple
      iterations of the write fallbacks before reaching the aligned
      boundaries, when layering a format with clusters larger than 64k
      atop the protocol of file access to a loopback device.
      
      Test case:
      
      $ qemu-img create -f qcow2 -o cluster_size=1M file 10M
      $ losetup /dev/loop2 /path/to/file
      $ qemu-io -f qcow2 /dev/loop2
      qemu-io> w 7m 1k
      qemu-io> w -z 8003584 2093056
      
      In fairness to Denis (as the original listed author of the culprit
      commit), the faulty logic for at most one iteration is probably all
      my fault in reworking his idea.  But the solution is to restore what
      was in place prior to that commit: when dealing with an unaligned
      head or tail, iterate as many times as necessary while fragmenting
      the operation at max_transfer boundaries.
      Reported-by: NEd Swierk <eswierk@skyportsystems.com>
      CC: qemu-stable@nongnu.org
      CC: Denis V. Lunev <den@openvz.org>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b2f95fee
    • E
      qcow2: Inform block layer about discard boundaries · ecdbead6
      Eric Blake 提交于
      At the qcow2 layer, discard is only possible on a per-cluster
      basis; at the moment, qcow2 silently rounds any unaligned
      requests to this granularity.  However, an upcoming patch will
      fix a regression in the block layer ignoring too much of an
      unaligned discard request, by changing the block layer to
      break up a discard request at alignment boundaries; for that
      to work, the block layer must know about our limits.
      
      However, we can't go one step further by changing
      qcow2_discard_clusters() to assert that requests are always
      aligned, since that helper function is reached on paths
      outside of the block layer.
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ecdbead6
    • E
      Fix FreeBSD (10.x) build after 7dc9ae43 · a7764f15
      Ed Maste 提交于
      Include sys/user.h for declaration of 'struct kinfo_proc'.
      Add -lutil to qemu-ga link for kinfo_getproc.
      Signed-off-by: NEd Maste <emaste@freebsd.org>
      Message-id: 1479778365-11315-1-git-send-email-emaste@freebsd.org
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a7764f15
    • S
      Merge remote-tracking branch 'jtc/tags/block-pull-request' into staging · 06bf33cf
      Stefan Hajnoczi 提交于
      # gpg: Signature made Mon 21 Nov 2016 10:12:43 PM GMT
      # gpg:                using RSA key 0xBDBE7B27C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057
      
      * jtc/tags/block-pull-request:
        gluster: Fix use after free in glfs_clear_preopened()
      
      Message-id: 1479766499-29972-1-git-send-email-jcody@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      06bf33cf
    • G
      seabios: update to 1.10.1 stable release · cae41fda
      Gerd Hoffmann 提交于
      git shortlog rel-1.10.0..rel-1.10.1
      ===================================
      
      Igor Mammedov (1):
            drop "etc/boot-cpus" fw_cfg file and reuse legacy QEMU_CFG_NB_CPUS
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      cae41fda
    • K
      gluster: Fix use after free in glfs_clear_preopened() · 668c0e44
      Kevin Wolf 提交于
      This fixes a use-after-free bug introduced in commit 6349c154. We need
      to use QLIST_FOREACH_SAFE() when freeing elements in the loop. Spotted
      by Coverity.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1479378608-11962-1-git-send-email-kwolf@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      668c0e44
  5. 21 11月, 2016 2 次提交
    • S
      Merge remote-tracking branch 'sstabellini/tags/xen-20161108-tag' into staging · ab9125c0
      Stefan Hajnoczi 提交于
      Xen 2016/11/08
      
      # gpg: Signature made Tue 08 Nov 2016 07:48:12 PM GMT
      # gpg:                using RSA key 0x894F8F4870E1AE90
      # gpg: Good signature from "Stefano Stabellini <sstabellini@kernel.org>"
      # gpg:                 aka "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
      # Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90
      
      * sstabellini/tags/xen-20161108-tag:
        xen: Fix xenpv machine initialisation
      
      Message-id: alpine.DEB.2.10.1611081150170.3491@sstabellini-ThinkPad-X260
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ab9125c0
    • S
      Merge remote-tracking branch 'mst/tags/for_upstream' into staging · c36ed06e
      Stefan Hajnoczi 提交于
      virtio, vhost, pc: fixes
      
      Most notably this fixes a regression with vhost introduced by the pull before
      last.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Fri 18 Nov 2016 03:51:55 PM GMT
      # gpg:                using RSA key 0x281F0DB8D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * mst/tags/for_upstream:
        acpi: Use apic_id_limit when calculating legacy ACPI table size
        ipmi: fix qemu crash while migrating with ipmi
        ivshmem: Fix 64 bit memory bar configuration
        virtio: set ISR on dataplane notifications
        virtio: access ISR atomically
        virtio: introduce grab/release_ioeventfd to fix vhost
        virtio-crypto: fix virtio_queue_set_notification() race
      
      Message-id: 1479484366-7977-1-git-send-email-mst@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c36ed06e
  6. 18 11月, 2016 12 次提交
  7. 17 11月, 2016 4 次提交
  8. 16 11月, 2016 3 次提交