]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Add set_size_vq for virtio-blk
authorAsias He <asias.hejun@gmail.com>
Sat, 7 Apr 2012 12:05:22 +0000 (20:05 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 9 Apr 2012 08:34:47 +0000 (11:34 +0300)
set_size_vq does not do the actual work, we can implement this later.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio/blk.c

index 407f995849d7dacb839b036d4caff4f1364a964a..b0613073d5e4b30263139f29e7cf4eeb1524f1ba 100644 (file)
@@ -193,9 +193,16 @@ static int get_pfn_vq(struct kvm *kvm, void *dev, u32 vq)
 
 static int get_size_vq(struct kvm *kvm, void *dev, u32 vq)
 {
+       /* FIXME: dynamic */
        return VIRTIO_BLK_QUEUE_SIZE;
 }
 
+static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size)
+{
+       /* FIXME: dynamic */
+       return size;
+}
+
 static struct virtio_ops blk_dev_virtio_ops = (struct virtio_ops) {
        .set_config             = set_config,
        .get_config             = get_config,
@@ -205,6 +212,7 @@ static struct virtio_ops blk_dev_virtio_ops = (struct virtio_ops) {
        .notify_vq              = notify_vq,
        .get_pfn_vq             = get_pfn_vq,
        .get_size_vq            = get_size_vq,
+       .set_size_vq            = set_size_vq,
 };
 
 static int virtio_blk__init_one(struct kvm *kvm, struct disk_image *disk)