All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/9] Block patches
@ 2016-06-28 13:23 Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 1/9] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save" Stefan Hajnoczi
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit fdc997ef54c5b2c3483969aee5f1d5f2a7587520:

  target-alpha: Avoid gcc 6.1 werror for linux-user (2016-06-27 21:03:58 +0100)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 2f2705908fc4b7be868d45b7b02159fb243a8457:

  virtio-blk: add num-queues device property (2016-06-28 13:08:32 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Stefan Hajnoczi (9):
  Revert "virtio: sync the dataplane vring state to the virtqueue before
    virtio_save"
  dma-helpers: dma_blk_io() cancel support
  virtio-blk: add VirtIOBlockConf->num_queues
  virtio-blk: multiqueue batch notify
  virtio-blk: tell dataplane which vq to notify
  virtio-blk: associate request with a virtqueue
  virtio-blk: live migrate s->rq with multiqueue
  virtio-blk: dataplane multiqueue support
  virtio-blk: add num-queues device property

 dma-helpers.c                   |  7 ++++
 hw/block/dataplane/virtio-blk.c | 81 +++++++++++++++++++++++++++++------------
 hw/block/dataplane/virtio-blk.h |  2 +-
 hw/block/virtio-blk.c           | 57 +++++++++++++++++++++--------
 hw/scsi/virtio-scsi.c           |  5 ---
 include/hw/virtio/virtio-blk.h  |  6 ++-
 6 files changed, 112 insertions(+), 46 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 1/9] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save"
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 2/9] dma-helpers: dma_blk_io() cancel support Stefan Hajnoczi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

This reverts commit 10a06fd65f667a972848ebbbcac11bdba931b544.

Dataplane has used the same virtqueue code as non-dataplane since
commits e24a47c5b73e04f94030e2daa356c7582aebfca2 ("virtio-scsi: do not
use vring in dataplane") and 03de2f527499ae0c6d16a379665d072345254f2c
("virtio-blk: do not use vring in dataplane").  It is no longer
necessary to stop dataplane in order to sync state since there is no
duplicated virtqueue state.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Message-id: 1466503331-9831-1-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/virtio-blk.c | 5 -----
 hw/scsi/virtio-scsi.c | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 284e646..beb4e12 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -795,11 +795,6 @@ static void virtio_blk_set_status(VirtIODevice *vdev, uint8_t status)
 static void virtio_blk_save(QEMUFile *f, void *opaque)
 {
     VirtIODevice *vdev = VIRTIO_DEVICE(opaque);
-    VirtIOBlock *s = VIRTIO_BLK(vdev);
-
-    if (s->dataplane) {
-        virtio_blk_data_plane_stop(s->dataplane);
-    }
 
     virtio_save(vdev, f);
 }
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 71d09d3..e8179d6 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -666,11 +666,6 @@ static void virtio_scsi_reset(VirtIODevice *vdev)
 static void virtio_scsi_save(QEMUFile *f, void *opaque)
 {
     VirtIODevice *vdev = VIRTIO_DEVICE(opaque);
-    VirtIOSCSI *s = VIRTIO_SCSI(vdev);
-
-    if (s->dataplane_started) {
-        virtio_scsi_dataplane_stop(s);
-    }
     virtio_save(vdev, f);
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 2/9] dma-helpers: dma_blk_io() cancel support
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 1/9] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save" Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 3/9] virtio-blk: add VirtIOBlockConf->num_queues Stefan Hajnoczi
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Attempting to cancel a dma_blk_io() request causes an abort(3):

  void bdrv_aio_cancel(BlockAIOCB *acb)
  {
      ...
      while (acb->refcnt > 1) {
          if (acb->aiocb_info->get_aio_context) {
              aio_poll(acb->aiocb_info->get_aio_context(acb), true);
          } else if (acb->bs) {
              aio_poll(bdrv_get_aio_context(acb->bs), true);
          } else {
              abort();
          }
      }
      ...
  }

This happens because DMAAIOCB->bs is NULL and
dma_aiocb_info.get_aio_context() is also NULL.

This patch trivially implements dma_aiocb_info.get_aio_context() by
fetching the DMAAIOCB->ctx field.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466451417-27988-1-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 dma-helpers.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dma-helpers.c b/dma-helpers.c
index b521d84..9defc10 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -185,10 +185,17 @@ static void dma_aio_cancel(BlockAIOCB *acb)
     }
 }
 
+static AioContext *dma_get_aio_context(BlockAIOCB *acb)
+{
+    DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common);
+
+    return dbs->ctx;
+}
 
 static const AIOCBInfo dma_aiocb_info = {
     .aiocb_size         = sizeof(DMAAIOCB),
     .cancel_async       = dma_aio_cancel,
+    .get_aio_context    = dma_get_aio_context,
 };
 
 BlockAIOCB *dma_blk_io(AioContext *ctx,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 3/9] virtio-blk: add VirtIOBlockConf->num_queues
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 1/9] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save" Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 2/9] dma-helpers: dma_blk_io() cancel support Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 4/9] virtio-blk: multiqueue batch notify Stefan Hajnoczi
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The num_queues field is always 1 for the time being.  A later patch will
make it a configurable device property so that multiqueue can be
enabled.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-2-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/virtio-blk.c          | 1 +
 include/hw/virtio/virtio-blk.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index beb4e12..4a3781a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -883,6 +883,7 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
     s->rq = NULL;
     s->sector_mask = (s->conf.conf.logical_block_size / BDRV_SECTOR_SIZE) - 1;
 
+    conf->num_queues = 1;
     s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output);
     virtio_blk_data_plane_create(vdev, conf, &s->dataplane, &err);
     if (err != NULL) {
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 8f2b056..9b03b6a 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -38,6 +38,7 @@ struct VirtIOBlkConf
     uint32_t scsi;
     uint32_t config_wce;
     uint32_t request_merging;
+    uint16_t num_queues;
 };
 
 struct VirtIOBlockDataPlane;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 4/9] virtio-blk: multiqueue batch notify
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 3/9] virtio-blk: add VirtIOBlockConf->num_queues Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 5/9] virtio-blk: tell dataplane which vq to notify Stefan Hajnoczi
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The batch notification BH needs to know which virtqueues to notify when
multiqueue is enabled.  Use a bitmap to track the virtqueues with
pending notifications.

At this point there is only one virtqueue so hard-code virtqueue index
0.  A later patch will switch to real virtqueue indices.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-3-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/dataplane/virtio-blk.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 2041b04..c20a195 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -34,8 +34,8 @@ struct VirtIOBlockDataPlane {
 
     VirtIODevice *vdev;
     VirtQueue *vq;                  /* virtqueue vring */
-    EventNotifier *guest_notifier;  /* irq */
     QEMUBH *bh;                     /* bh for guest notification */
+    unsigned long *batch_notify_vqs;
 
     /* Note that these EventNotifiers are assigned by value.  This is
      * fine as long as you do not call event_notifier_cleanup on them
@@ -49,18 +49,34 @@ struct VirtIOBlockDataPlane {
 /* Raise an interrupt to signal guest, if necessary */
 void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s)
 {
+    set_bit(0, s->batch_notify_vqs);
     qemu_bh_schedule(s->bh);
 }
 
 static void notify_guest_bh(void *opaque)
 {
     VirtIOBlockDataPlane *s = opaque;
+    unsigned nvqs = s->conf->num_queues;
+    unsigned long bitmap[BITS_TO_LONGS(nvqs)];
+    unsigned j;
 
-    if (!virtio_should_notify(s->vdev, s->vq)) {
-        return;
+    memcpy(bitmap, s->batch_notify_vqs, sizeof(bitmap));
+    memset(s->batch_notify_vqs, 0, sizeof(bitmap));
+
+    for (j = 0; j < nvqs; j += BITS_PER_LONG) {
+        unsigned long bits = bitmap[j];
+
+        while (bits != 0) {
+            unsigned i = j + ctzl(bits);
+            VirtQueue *vq = virtio_get_queue(s->vdev, i);
+
+            if (virtio_should_notify(s->vdev, vq)) {
+                event_notifier_set(virtio_queue_get_guest_notifier(vq));
+            }
+
+            bits &= bits - 1; /* clear right-most bit */
+        }
     }
-
-    event_notifier_set(s->guest_notifier);
 }
 
 /* Context: QEMU global mutex held */
@@ -104,6 +120,7 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
     }
     s->ctx = iothread_get_aio_context(s->iothread);
     s->bh = aio_bh_new(s->ctx, notify_guest_bh, s);
+    s->batch_notify_vqs = bitmap_new(conf->num_queues);
 
     *dataplane = s;
 }
@@ -116,6 +133,7 @@ void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
     }
 
     virtio_blk_data_plane_stop(s);
+    g_free(s->batch_notify_vqs);
     qemu_bh_delete(s->bh);
     object_unref(OBJECT(s->iothread));
     g_free(s);
@@ -154,7 +172,6 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
                 "ensure -enable-kvm is set\n", r);
         goto fail_guest_notifiers;
     }
-    s->guest_notifier = virtio_queue_get_guest_notifier(s->vq);
 
     /* Set up virtqueue notify */
     r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, true);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 5/9] virtio-blk: tell dataplane which vq to notify
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (3 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 4/9] virtio-blk: multiqueue batch notify Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 6/9] virtio-blk: associate request with a virtqueue Stefan Hajnoczi
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Let the virtio_blk_data_plane_notify() caller decide which virtqueue to
notify.  This will allow the function to be used with multiqueue.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-4-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/dataplane/virtio-blk.c | 4 ++--
 hw/block/dataplane/virtio-blk.h | 2 +-
 hw/block/virtio-blk.c           | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index c20a195..835021b 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -47,9 +47,9 @@ struct VirtIOBlockDataPlane {
 };
 
 /* Raise an interrupt to signal guest, if necessary */
-void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s)
+void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s, VirtQueue *vq)
 {
-    set_bit(0, s->batch_notify_vqs);
+    set_bit(virtio_get_queue_index(vq), s->batch_notify_vqs);
     qemu_bh_schedule(s->bh);
 }
 
diff --git a/hw/block/dataplane/virtio-blk.h b/hw/block/dataplane/virtio-blk.h
index 0714c11..b1f0b95 100644
--- a/hw/block/dataplane/virtio-blk.h
+++ b/hw/block/dataplane/virtio-blk.h
@@ -26,6 +26,6 @@ void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s);
 void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s);
 void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s);
 void virtio_blk_data_plane_drain(VirtIOBlockDataPlane *s);
-void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s);
+void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s, VirtQueue *vq);
 
 #endif /* HW_DATAPLANE_VIRTIO_BLK_H */
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 4a3781a..bcce3df 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -55,7 +55,7 @@ static void virtio_blk_req_complete(VirtIOBlockReq *req, unsigned char status)
     stb_p(&req->in->status, status);
     virtqueue_push(s->vq, &req->elem, req->in_len);
     if (s->dataplane_started && !s->dataplane_disabled) {
-        virtio_blk_data_plane_notify(s->dataplane);
+        virtio_blk_data_plane_notify(s->dataplane, s->vq);
     } else {
         virtio_notify(vdev, s->vq);
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 6/9] virtio-blk: associate request with a virtqueue
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (4 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 5/9] virtio-blk: tell dataplane which vq to notify Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 7/9] virtio-blk: live migrate s->rq with multiqueue Stefan Hajnoczi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Multiqueue requires that each request knows to which virtqueue it
belongs.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-5-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/virtio-blk.c          | 20 +++++++++++---------
 include/hw/virtio/virtio-blk.h |  4 +++-
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index bcce3df..3c6a1fa 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -29,9 +29,11 @@
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
 
-void virtio_blk_init_request(VirtIOBlock *s, VirtIOBlockReq *req)
+void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
+                             VirtIOBlockReq *req)
 {
     req->dev = s;
+    req->vq = vq;
     req->qiov.size = 0;
     req->in_len = 0;
     req->next = NULL;
@@ -53,11 +55,11 @@ static void virtio_blk_req_complete(VirtIOBlockReq *req, unsigned char status)
     trace_virtio_blk_req_complete(req, status);
 
     stb_p(&req->in->status, status);
-    virtqueue_push(s->vq, &req->elem, req->in_len);
+    virtqueue_push(req->vq, &req->elem, req->in_len);
     if (s->dataplane_started && !s->dataplane_disabled) {
-        virtio_blk_data_plane_notify(s->dataplane, s->vq);
+        virtio_blk_data_plane_notify(s->dataplane, req->vq);
     } else {
-        virtio_notify(vdev, s->vq);
+        virtio_notify(vdev, req->vq);
     }
 }
 
@@ -187,12 +189,12 @@ out:
 
 #endif
 
-static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
+static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s, VirtQueue *vq)
 {
-    VirtIOBlockReq *req = virtqueue_pop(s->vq, sizeof(VirtIOBlockReq));
+    VirtIOBlockReq *req = virtqueue_pop(vq, sizeof(VirtIOBlockReq));
 
     if (req) {
-        virtio_blk_init_request(s, req);
+        virtio_blk_init_request(s, vq, req);
     }
     return req;
 }
@@ -583,7 +585,7 @@ void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq)
 
     blk_io_plug(s->blk);
 
-    while ((req = virtio_blk_get_request(s))) {
+    while ((req = virtio_blk_get_request(s, vq))) {
         virtio_blk_handle_request(req, &mrb);
     }
 
@@ -831,7 +833,7 @@ static int virtio_blk_load_device(VirtIODevice *vdev, QEMUFile *f,
     while (qemu_get_sbyte(f)) {
         VirtIOBlockReq *req;
         req = qemu_get_virtqueue_element(f, sizeof(VirtIOBlockReq));
-        virtio_blk_init_request(s, req);
+        virtio_blk_init_request(s, s->vq, req);
         req->next = s->rq;
         s->rq = req;
     }
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 9b03b6a..a25b344 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -63,6 +63,7 @@ typedef struct VirtIOBlockReq {
     VirtQueueElement elem;
     int64_t sector_num;
     VirtIOBlock *dev;
+    VirtQueue *vq;
     struct virtio_blk_inhdr *in;
     struct virtio_blk_outhdr out;
     QEMUIOVector qiov;
@@ -80,7 +81,8 @@ typedef struct MultiReqBuffer {
     bool is_write;
 } MultiReqBuffer;
 
-void virtio_blk_init_request(VirtIOBlock *s, VirtIOBlockReq *req);
+void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
+                             VirtIOBlockReq *req);
 void virtio_blk_free_request(VirtIOBlockReq *req);
 
 void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 7/9] virtio-blk: live migrate s->rq with multiqueue
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (5 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 6/9] virtio-blk: associate request with a virtqueue Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 8/9] virtio-blk: dataplane multiqueue support Stefan Hajnoczi
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Add a field for the virtqueue index when migrating the s->rq request
list.  The new field is only needed when num_queues > 1.  Existing QEMUs
are unaffected by this change and therefore virtio-blk migration stays
compatible.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-6-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/virtio-blk.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 3c6a1fa..0353f38 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -808,6 +808,11 @@ static void virtio_blk_save_device(VirtIODevice *vdev, QEMUFile *f)
 
     while (req) {
         qemu_put_sbyte(f, 1);
+
+        if (s->conf.num_queues > 1) {
+            qemu_put_be32(f, virtio_get_queue_index(req->vq));
+        }
+
         qemu_put_virtqueue_element(f, &req->elem);
         req = req->next;
     }
@@ -831,9 +836,22 @@ static int virtio_blk_load_device(VirtIODevice *vdev, QEMUFile *f,
     VirtIOBlock *s = VIRTIO_BLK(vdev);
 
     while (qemu_get_sbyte(f)) {
+        unsigned nvqs = s->conf.num_queues;
+        unsigned vq_idx = 0;
         VirtIOBlockReq *req;
+
+        if (nvqs > 1) {
+            vq_idx = qemu_get_be32(f);
+
+            if (vq_idx >= nvqs) {
+                error_report("Invalid virtqueue index in request list: %#x",
+                             vq_idx);
+                return -EINVAL;
+            }
+        }
+
         req = qemu_get_virtqueue_element(f, sizeof(VirtIOBlockReq));
-        virtio_blk_init_request(s, s->vq, req);
+        virtio_blk_init_request(s, virtio_get_queue(vdev, vq_idx), req);
         req->next = s->rq;
         s->rq = req;
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 8/9] virtio-blk: dataplane multiqueue support
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (6 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 7/9] virtio-blk: live migrate s->rq with multiqueue Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 13:23 ` [Qemu-devel] [PULL 9/9] virtio-blk: add num-queues device property Stefan Hajnoczi
  2016-06-28 14:03 ` [Qemu-devel] [PULL 0/9] Block patches Peter Maydell
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Monitor ioeventfds for all virtqueues in the device's AioContext.  This
is not true multiqueue because requests from all virtqueues are
processed in a single IOThread.  In the future it will be possible to
use multiple IOThreads when the QEMU block layer supports multiqueue.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-7-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/dataplane/virtio-blk.c | 50 ++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 16 deletions(-)

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 835021b..54b9ac1 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -31,9 +31,7 @@ struct VirtIOBlockDataPlane {
     bool stopping;
 
     VirtIOBlkConf *conf;
-
     VirtIODevice *vdev;
-    VirtQueue *vq;                  /* virtqueue vring */
     QEMUBH *bh;                     /* bh for guest notification */
     unsigned long *batch_notify_vqs;
 
@@ -156,6 +154,8 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev)));
     VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
     VirtIOBlock *vblk = VIRTIO_BLK(s->vdev);
+    unsigned i;
+    unsigned nvqs = s->conf->num_queues;
     int r;
 
     if (vblk->dataplane_started || s->starting) {
@@ -163,10 +163,9 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     }
 
     s->starting = true;
-    s->vq = virtio_get_queue(s->vdev, 0);
 
     /* Set up guest notifier (irq) */
-    r = k->set_guest_notifiers(qbus->parent, 1, true);
+    r = k->set_guest_notifiers(qbus->parent, nvqs, true);
     if (r != 0) {
         fprintf(stderr, "virtio-blk failed to set guest notifier (%d), "
                 "ensure -enable-kvm is set\n", r);
@@ -174,10 +173,15 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     }
 
     /* Set up virtqueue notify */
-    r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, true);
-    if (r != 0) {
-        fprintf(stderr, "virtio-blk failed to set host notifier (%d)\n", r);
-        goto fail_host_notifier;
+    for (i = 0; i < nvqs; i++) {
+        r = virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), i, true);
+        if (r != 0) {
+            fprintf(stderr, "virtio-blk failed to set host notifier (%d)\n", r);
+            while (i--) {
+                virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), i, false);
+            }
+            goto fail_guest_notifiers;
+        }
     }
 
     s->starting = false;
@@ -187,17 +191,23 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
     blk_set_aio_context(s->conf->conf.blk, s->ctx);
 
     /* Kick right away to begin processing requests already in vring */
-    event_notifier_set(virtio_queue_get_host_notifier(s->vq));
+    for (i = 0; i < nvqs; i++) {
+        VirtQueue *vq = virtio_get_queue(s->vdev, i);
+
+        event_notifier_set(virtio_queue_get_host_notifier(vq));
+    }
 
     /* Get this show started by hooking up our callbacks */
     aio_context_acquire(s->ctx);
-    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx,
-                                               virtio_blk_data_plane_handle_output);
+    for (i = 0; i < nvqs; i++) {
+        VirtQueue *vq = virtio_get_queue(s->vdev, i);
+
+        virtio_queue_aio_set_host_notifier_handler(vq, s->ctx,
+                virtio_blk_data_plane_handle_output);
+    }
     aio_context_release(s->ctx);
     return;
 
-  fail_host_notifier:
-    k->set_guest_notifiers(qbus->parent, 1, false);
   fail_guest_notifiers:
     vblk->dataplane_disabled = true;
     s->starting = false;
@@ -210,6 +220,8 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
     BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev)));
     VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
     VirtIOBlock *vblk = VIRTIO_BLK(s->vdev);
+    unsigned i;
+    unsigned nvqs = s->conf->num_queues;
 
     if (!vblk->dataplane_started || s->stopping) {
         return;
@@ -227,17 +239,23 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
     aio_context_acquire(s->ctx);
 
     /* Stop notifications for new requests from guest */
-    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, NULL);
+    for (i = 0; i < nvqs; i++) {
+        VirtQueue *vq = virtio_get_queue(s->vdev, i);
+
+        virtio_queue_aio_set_host_notifier_handler(vq, s->ctx, NULL);
+    }
 
     /* Drain and switch bs back to the QEMU main loop */
     blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
 
     aio_context_release(s->ctx);
 
-    virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), 0, false);
+    for (i = 0; i < nvqs; i++) {
+        virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), i, false);
+    }
 
     /* Clean up guest notifier (irq) */
-    k->set_guest_notifiers(qbus->parent, 1, false);
+    k->set_guest_notifiers(qbus->parent, nvqs, false);
 
     vblk->dataplane_started = false;
     s->stopping = false;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 9/9] virtio-blk: add num-queues device property
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (7 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 8/9] virtio-blk: dataplane multiqueue support Stefan Hajnoczi
@ 2016-06-28 13:23 ` Stefan Hajnoczi
  2016-06-28 14:03 ` [Qemu-devel] [PULL 0/9] Block patches Peter Maydell
  9 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2016-06-28 13:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

Multiqueue virtio-blk can be enabled as follows:

  qemu -device virtio-blk-pci,num-queues=8

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-8-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/block/virtio-blk.c          | 15 +++++++++++++--
 include/hw/virtio/virtio-blk.h |  1 -
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 0353f38..fb43bba 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -710,6 +710,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config)
     blkcfg.physical_block_exp = get_physical_block_exp(conf);
     blkcfg.alignment_offset = 0;
     blkcfg.wce = blk_enable_write_cache(s->blk);
+    virtio_stw_p(vdev, &blkcfg.num_queues, s->conf.num_queues);
     memcpy(config, &blkcfg, sizeof(struct virtio_blk_config));
 }
 
@@ -753,6 +754,9 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,
     if (blk_is_read_only(s->blk)) {
         virtio_add_feature(&features, VIRTIO_BLK_F_RO);
     }
+    if (s->conf.num_queues > 1) {
+        virtio_add_feature(&features, VIRTIO_BLK_F_MQ);
+    }
 
     return features;
 }
@@ -877,6 +881,7 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
     VirtIOBlkConf *conf = &s->conf;
     Error *err = NULL;
     static int virtio_blk_id;
+    unsigned i;
 
     if (!conf->conf.blk) {
         error_setg(errp, "drive property not set");
@@ -886,6 +891,10 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
         error_setg(errp, "Device needs media, but drive is empty");
         return;
     }
+    if (!conf->num_queues) {
+        error_setg(errp, "num-queues property must be larger than 0");
+        return;
+    }
 
     blkconf_serial(&conf->conf, &conf->serial);
     s->original_wce = blk_enable_write_cache(conf->conf.blk);
@@ -903,8 +912,9 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
     s->rq = NULL;
     s->sector_mask = (s->conf.conf.logical_block_size / BDRV_SECTOR_SIZE) - 1;
 
-    conf->num_queues = 1;
-    s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output);
+    for (i = 0; i < conf->num_queues; i++) {
+        virtio_add_queue(vdev, 128, virtio_blk_handle_output);
+    }
     virtio_blk_data_plane_create(vdev, conf, &s->dataplane, &err);
     if (err != NULL) {
         error_propagate(errp, err);
@@ -957,6 +967,7 @@ static Property virtio_blk_properties[] = {
 #endif
     DEFINE_PROP_BIT("request-merging", VirtIOBlock, conf.request_merging, 0,
                     true),
+    DEFINE_PROP_UINT16("num-queues", VirtIOBlock, conf.num_queues, 1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index a25b344..e9bf463 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -47,7 +47,6 @@ struct VirtIOBlockReq;
 typedef struct VirtIOBlock {
     VirtIODevice parent_obj;
     BlockBackend *blk;
-    VirtQueue *vq;
     void *rq;
     QEMUBH *bh;
     VirtIOBlkConf conf;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 0/9] Block patches
  2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
                   ` (8 preceding siblings ...)
  2016-06-28 13:23 ` [Qemu-devel] [PULL 9/9] virtio-blk: add num-queues device property Stefan Hajnoczi
@ 2016-06-28 14:03 ` Peter Maydell
  9 siblings, 0 replies; 19+ messages in thread
From: Peter Maydell @ 2016-06-28 14:03 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 28 June 2016 at 14:23, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit fdc997ef54c5b2c3483969aee5f1d5f2a7587520:
>
>   target-alpha: Avoid gcc 6.1 werror for linux-user (2016-06-27 21:03:58 +0100)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 2f2705908fc4b7be868d45b7b02159fb243a8457:
>
>   virtio-blk: add num-queues device property (2016-06-28 13:08:32 +0100)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 0/9] Block patches
  2019-02-11  5:50 Stefan Hajnoczi
@ 2019-02-11 11:42 ` Peter Maydell
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Maydell @ 2019-02-11 11:42 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: QEMU Developers, Marcel Apfelbaum, Thomas Huth, Eduardo Habkost,
	Laurent Vivier, Max Reitz, Michael S. Tsirkin, Paolo Bonzini,
	Qemu-block, Kevin Wolf

On Mon, 11 Feb 2019 at 05:50, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit e47f81b617684c4546af286d307b69014a83538a:
>
>   Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-02-07 18:53:25 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 55140166667bb555c5d05165b93b25557d2e6397:
>
>   tests/virtio-blk: add test for WRITE_ZEROES command (2019-02-11 11:58:17 +0800)
>
> ----------------------------------------------------------------
> Pull request
>
> User-visible changes:
>
>  * virtio-blk: DISCARD and WRITE_ZEROES support

Hi; this fails to pass "make check" (all platforms):

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=arm-softmmu/qemu-system-arm QTEST_QEMU_IMG=qemu-img
tests/virtio-blk-test -m
=quick -k --tap < /dev/null | ./scripts/tap-driver.pl
--test-name="virtio-blk-test"
**
ERROR:/home/pm215/qemu/tests/virtio-blk-test.c:272:test_basic:
assertion failed (status == 0): (1 == 0)
ERROR - too few tests run (expected 1, got 0)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 0/9] Block patches
@ 2019-02-11  5:50 Stefan Hajnoczi
  2019-02-11 11:42 ` Peter Maydell
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Hajnoczi @ 2019-02-11  5:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Peter Maydell, Thomas Huth, Stefan Hajnoczi,
	Eduardo Habkost, Laurent Vivier, Max Reitz, Michael S. Tsirkin,
	Paolo Bonzini, qemu-block, Kevin Wolf

The following changes since commit e47f81b617684c4546af286d307b69014a83538a:

  Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-02-07 18:53:25 +0000)

are available in the Git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 55140166667bb555c5d05165b93b25557d2e6397:

  tests/virtio-blk: add test for WRITE_ZEROES command (2019-02-11 11:58:17 +0800)

----------------------------------------------------------------
Pull request

User-visible changes:

 * virtio-blk: DISCARD and WRITE_ZEROES support

----------------------------------------------------------------

Peter Xu (1):
  iothread: fix iothread hang when stop too soon

Stefano Garzarella (7):
  virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev
  virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()
  virtio-blk: add host_features field in VirtIOBlock
  virtio-blk: add "discard" and "write-zeroes" properties
  virtio-blk: add DISCARD and WRITE_ZEROES features
  tests/virtio-blk: change assert on data_size in virtio_blk_request()
  tests/virtio-blk: add test for WRITE_ZEROES command

Vladimir Sementsov-Ogievskiy (1):
  qemugdb/coroutine: fix arch_prctl has unknown return type

 include/hw/virtio/virtio-blk.h |   5 +-
 hw/block/virtio-blk.c          | 236 +++++++++++++++++++++++++++++----
 hw/core/machine.c              |   2 +
 iothread.c                     |   6 +-
 tests/virtio-blk-test.c        |  75 ++++++++++-
 scripts/qemugdb/coroutine.py   |   2 +-
 6 files changed, 297 insertions(+), 29 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 0/9] Block patches
  2017-02-21 15:40 Jeff Cody
@ 2017-02-21 18:16 ` Peter Maydell
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Maydell @ 2017-02-21 18:16 UTC (permalink / raw)
  To: Jeff Cody; +Cc: Qemu-block, QEMU Developers, Stefan Hajnoczi

On 21 February 2017 at 15:40, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit a1cf5fac2b929ffa2abd1285401f2535ff8c6fea:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-21' into staging (2017-02-21 13:58:50 +0000)
>
> are available in the git repository at:
>
>   git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 6135c5e12606b8413708384e3e7d43f6010c5941:
>
>   qemu-options: Fix broken sheepdog URL (2017-02-21 10:38:09 -0500)
>
> ----------------------------------------------------------------
> Block patches

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 0/9] Block patches
@ 2017-02-21 15:40 Jeff Cody
  2017-02-21 18:16 ` Peter Maydell
  0 siblings, 1 reply; 19+ messages in thread
From: Jeff Cody @ 2017-02-21 15:40 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel, stefanha

The following changes since commit a1cf5fac2b929ffa2abd1285401f2535ff8c6fea:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-21' into staging (2017-02-21 13:58:50 +0000)

are available in the git repository at:

  git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to 6135c5e12606b8413708384e3e7d43f6010c5941:

  qemu-options: Fix broken sheepdog URL (2017-02-21 10:38:09 -0500)

----------------------------------------------------------------
Block patches
----------------------------------------------------------------

Anton Nefedov (1):
  mirror: do not increase offset during initial zero_or_discard phase

Jeff Cody (1):
  QAPI: Fix blockdev-add example documentation

Kevin Wolf (6):
  iscsi: Split URL into individual options
  iscsi: Handle -iscsi user/password in bdrv_parse_filename()
  iscsi: Add initiator-name option
  iscsi: Add header-digest option
  iscsi: Add timeout option
  iscsi: Add blockdev-add support

Thomas Huth (1):
  qemu-options: Fix broken sheepdog URL

 block/iscsi.c        | 353 +++++++++++++++++++++++++++++++--------------------
 block/mirror.c       |   9 +-
 qapi/block-core.json | 125 +++++++++++++-----
 qemu-options.hx      |   2 +-
 4 files changed, 317 insertions(+), 172 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] [PULL 0/9] Block patches
  2014-02-28 18:33 Stefan Hajnoczi
@ 2014-03-04 17:02 ` Peter Maydell
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Maydell @ 2014-03-04 17:02 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers, Anthony Liguori

On 28 February 2014 18:33, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 9fbee91a131a05e443d7108d7fbdf3ca91020290:
>
>   Merge remote-tracking branch 'remotes/kvm/uq/master' into staging (2014-02-27 16:00:31 +0000)
>
> are available in the git repository at:
>
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 3eba13ec25341ce473591ff338eab3196890a4eb:
>
>   block/vmdk: do not report file offset for compressed extents (2014-02-28 18:59:07 +0100)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 0/9] Block patches
@ 2014-02-28 18:33 Stefan Hajnoczi
  2014-03-04 17:02 ` Peter Maydell
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Hajnoczi @ 2014-02-28 18:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Anthony Liguori

The following changes since commit 9fbee91a131a05e443d7108d7fbdf3ca91020290:

  Merge remote-tracking branch 'remotes/kvm/uq/master' into staging (2014-02-27 16:00:31 +0000)

are available in the git repository at:


  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 3eba13ec25341ce473591ff338eab3196890a4eb:

  block/vmdk: do not report file offset for compressed extents (2014-02-28 18:59:07 +0100)

----------------------------------------------------------------
Block pull request

----------------------------------------------------------------
Amit Shah (1):
      block: use /var/tmp instead of /tmp for -snapshot

Benoît Canet (3):
      qmp: Fix BlockdevOptionQuorum.
      qmp: Make Quorum error events more palatable.
      qemu-io-test: Disable Quorum test when not compiled in.

Jeff Cody (2):
      block: gluster - code movements, state storage changes
      block: gluster - add reopen support.

Loic Dachary (1):
      discard rbd error output when not relevant in qemu-iotests

Paolo Bonzini (1):
      qemu-iotests: add more tests to the "quick" group

Peter Lieven (1):
      block/vmdk: do not report file offset for compressed extents

 block.c                      |   5 +-
 block/gluster.c              | 143 ++++++++++++++++++++++++++++++++++++++-----
 block/quorum.c               |   9 ++-
 block/vmdk.c                 |   2 +-
 docs/qmp/qmp-events.txt      |  75 ++++++++++++-----------
 qapi-schema.json             |   5 +-
 tests/qemu-iotests-quick.sh  |   1 +
 tests/qemu-iotests/081       |   3 +
 tests/qemu-iotests/081.out   |   2 +-
 tests/qemu-iotests/common.rc |   2 +-
 tests/qemu-iotests/group     |  34 +++++-----
 11 files changed, 203 insertions(+), 78 deletions(-)

-- 
1.8.5.3

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 0/9] Block patches
@ 2013-03-04  9:15 Stefan Hajnoczi
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Hajnoczi @ 2013-03-04  9:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

The following changes since commit 806f352d3d6f7b326b0ab3a49c622b124459dc8d:

  gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end (2013-03-03 14:29:08 +0000)

are available in the git repository at:

  git://github.com/stefanha/qemu.git block

for you to fetch changes up to 272d2d8e1241b92ab9be87b2c8fb590fd84987a8:

  block: for HMP commit() operations on 'all', skip non-COW drives (2013-03-04 09:54:17 +0100)

----------------------------------------------------------------
Christian Borntraeger (1):
      virtio-blk: fix unplug + virsh reboot

Jeff Cody (1):
      block: for HMP commit() operations on 'all', skip non-COW drives

MORITA Kazutaka (5):
      slirp/tcp_subr.c: fix coding style in tcp_connect
      move socket_set_nodelay to osdep.c
      sheepdog: accept URIs
      sheepdog: use inet_connect to simplify connect code
      sheepdog: add support for connecting to unix domain socket

Mark Cave-Ayland (1):
      ide/macio: Fix macio DMA initialisation.

Paolo Bonzini (1):
      dataplane: remove EventPoll in favor of AioContext

 block.c                    |   8 +-
 block/sheepdog.c           | 315 +++++++++++++++++++++++++++------------------
 gdbstub.c                  |   5 +-
 hw/dataplane/Makefile.objs |   2 +-
 hw/dataplane/event-poll.c  | 100 --------------
 hw/dataplane/event-poll.h  |  40 ------
 hw/dataplane/virtio-blk.c  |  48 ++++---
 hw/macio.c                 |   2 +-
 hw/virtio-blk.c            |   4 +-
 include/qemu/sockets.h     |   1 +
 qemu-char.c                |   6 -
 qemu-doc.texi              |  22 ++--
 qemu-options.hx            |  18 +--
 slirp/tcp_subr.c           | 139 ++++++++++----------
 util/osdep.c               |   6 +
 15 files changed, 328 insertions(+), 388 deletions(-)
 delete mode 100644 hw/dataplane/event-poll.c
 delete mode 100644 hw/dataplane/event-poll.h

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Qemu-devel] [PULL 0/9] Block patches
@ 2011-03-16 10:47 Kevin Wolf
  0 siblings, 0 replies; 19+ messages in thread
From: Kevin Wolf @ 2011-03-16 10:47 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

The following changes since commit cc015e9a5dde2f03f123357fa060acbdfcd570a4:

  add Win32 IPI service (2011-03-13 14:44:22 +0000)

are available in the git repository at:
  git://repo.or.cz/qemu/kevin.git for-anthony

Brian Wheeler (1):
      Fix ATA SMART and CHECK POWER MODE

Feiran Zheng (1):
      hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

Jes Sorensen (1):
      Improve error handling in do_snapshot_blkdev()

Kevin Wolf (3):
      Add error message for loading snapshot without VM state
      tools: Use real async.c instead of stubs
      Add qcow2 documentation

Ryan Harper (1):
      Don't allow multiwrites against a block device without underlying medium

Stefan Weil (2):
      block/vdi: Don't ignore immediate read/write failures
      block/qcow: Don't ignore immediate read/write and other failures

 Makefile.objs        |    4 +-
 block.c              |    8 ++
 block/qcow.c         |   16 +++-
 block/vdi.c          |    5 +
 blockdev.c           |   23 ++++-
 docs/specs/qcow2.txt |  260 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/ide/core.c        |   41 ++++++---
 hw/xen_disk.c        |    2 +-
 qemu-tool.c          |   47 +--------
 savevm.c             |    2 +
 10 files changed, 339 insertions(+), 69 deletions(-)
 create mode 100644 docs/specs/qcow2.txt

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-02-11 11:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28 13:23 [Qemu-devel] [PULL 0/9] Block patches Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 1/9] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save" Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 2/9] dma-helpers: dma_blk_io() cancel support Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 3/9] virtio-blk: add VirtIOBlockConf->num_queues Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 4/9] virtio-blk: multiqueue batch notify Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 5/9] virtio-blk: tell dataplane which vq to notify Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 6/9] virtio-blk: associate request with a virtqueue Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 7/9] virtio-blk: live migrate s->rq with multiqueue Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 8/9] virtio-blk: dataplane multiqueue support Stefan Hajnoczi
2016-06-28 13:23 ` [Qemu-devel] [PULL 9/9] virtio-blk: add num-queues device property Stefan Hajnoczi
2016-06-28 14:03 ` [Qemu-devel] [PULL 0/9] Block patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2019-02-11  5:50 Stefan Hajnoczi
2019-02-11 11:42 ` Peter Maydell
2017-02-21 15:40 Jeff Cody
2017-02-21 18:16 ` Peter Maydell
2014-02-28 18:33 Stefan Hajnoczi
2014-03-04 17:02 ` Peter Maydell
2013-03-04  9:15 Stefan Hajnoczi
2011-03-16 10:47 Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.