1. 21 9月, 2013 1 次提交
    • P
      virtio-blk: do not relay a previous driver's WCE configuration to the current · ef5bc962
      Paolo Bonzini 提交于
      The following sequence happens:
      - the SeaBIOS virtio-blk driver does not support the WCE feature, which
      causes QEMU to disable writeback caching
      
      - the Linux virtio-blk driver resets the device, finds WCE is available
      but writeback caching is disabled; tells block layer to not send cache
      flush commands
      
      - the Linux virtio-blk driver sets the DRIVER_OK bit, which causes
      writeback caching to be re-enabled, but the Linux virtio-blk driver does
      not know of this side effect and cache flushes remain disabled
      
      The bug is at the third step.  If the guest does know about CONFIG_WCE,
      QEMU should ignore the WCE feature's state.  The guest will control the
      cache mode solely using configuration space.  This change makes Linux
      do flushes correctly, but Linux will keep SeaBIOS's writethrough mode.
      
      Hence, whenever the guest is reset, the cache mode of the disk should
      be reset to whatever was specified in the "-drive" option.  With this
      change, the Linux virtio-blk driver finds that writeback caching is
      enabled, and tells the block layer to send cache flush commands
      appropriately.
      
      Reported-by: Rusty Russell <rusty@au1.ibm.com
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ef5bc962
  2. 12 9月, 2013 1 次提交
  3. 06 9月, 2013 3 次提交
    • C
      dataplane: Fix startup race. · 8caf907f
      Cornelia Huck 提交于
      Avoid trying to setup dataplane again if dataplane setup is already in
      progress. This may happen if an eventfd is triggered during setup.
      
      I saw this occasionally with an experimental s390 irqfd implementation:
      
      virtio_blk_handle_output
      -> virtio_blk_data_plane_start
      -> virtio_ccw_set_host_notifier
      ...
      -> virtio_queue_set_host_notifier_fd_handler
      -> virtio_queue_host_notifier_read
      -> virtio_queue_notify_vq
      -> virtio_blk_handle_output
      -> virtio_blk_data_plane_start
      -> vring_setup
      -> hostmem_init
      -> memory_listener_register
      -> BOOM
      
      As virtio-ccw tries to follow what virtio-pci does, it might be triggerable
      for other platforms as well.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8caf907f
    • F
      xen_disk: simplify blk_disconnect with refcnt · c0777fe1
      Fam Zheng 提交于
      We call bdrv_attach_dev when initializing whether or not bs is created
      locally, so call bdrv_detach_dev and let the refcnt handle the
      lifecycle.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c0777fe1
    • F
      block: make bdrv_delete() static · 4f6fd349
      Fam Zheng 提交于
      Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no
      longer public and should be called by bdrv_unref() if refcnt is
      decreased to 0.
      
      This is an identical change because effectively, there's no multiple
      reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets
      bs->refcnt to 1, so all bdrv_unref() now actually delete the BDS.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4f6fd349
  4. 01 9月, 2013 1 次提交
  5. 23 8月, 2013 1 次提交
  6. 19 8月, 2013 3 次提交
  7. 12 8月, 2013 3 次提交
  8. 30 7月, 2013 2 次提交
  9. 29 7月, 2013 5 次提交
  10. 23 7月, 2013 7 次提交
  11. 19 7月, 2013 2 次提交
    • E
      block/m25p80: Update Micron entries · f5aac8e0
      Ed Maste 提交于
      - Split 32Mb and 256Mb parts into a11 and a13 variants.
      - Add the 4K sector flag to the 128Mb parts.  (These entries were taken from
        the Linux kernel list, which is missing the flag.)
      - Fill out the table of sizes with entries for 64Mb parts.
      
      Prodded by Peter Crosthwaite.
      Signed-off-by: NEd Maste <emaste@freebsd.org>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      f5aac8e0
    • S
      dataplane: sync virtio.c and vring.c virtqueue state · 9154b02c
      Stefan Hajnoczi 提交于
      Load the virtio.c state into vring.c when we start dataplane mode and
      vice versa when stopping dataplane mode.  This patch makes it possible
      to start and stop dataplane any time while the guest is running.
      
      This will eventually allow us to go back to QEMU main loop for
      bdrv_drain_all() and live migration.  In the meantime, this patch makes
      the dataplane lifecycle more robust but should make no visible
      difference.  It may be useful in the virtio-net dataplane effort.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9154b02c
  12. 04 7月, 2013 2 次提交
  13. 26 6月, 2013 3 次提交
  14. 22 6月, 2013 1 次提交
  15. 20 6月, 2013 1 次提交
  16. 17 6月, 2013 1 次提交
  17. 07 6月, 2013 2 次提交
  18. 04 6月, 2013 1 次提交
    • F
      block: add block driver read only whitelist · b64ec4e4
      Fam Zheng 提交于
      We may want to include a driver in the whitelist for read only tasks
      such as diagnosing or exporting guest data (with libguestfs as a good
      example). This patch introduces a readonly whitelist option, and for
      backward compatibility, the old configure option --block-drv-whitelist
      is now an alias to rw whitelist.
      
      Drivers in readonly list is only permitted to open file readonly, and
      returns -ENOTSUP for RW opening.
      
      E.g. To include vmdk readonly, and others read+write:
          ./configure --target-list=x86_64-softmmu \
                      --block-drv-rw-whitelist=qcow2,raw,file,qed \
                      --block-drv-ro-whitelist=vmdk
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b64ec4e4