From: Asias He <[email protected]>

set_size_vq does not do the actuall work, we can implement this later.

Signed-off-by: Asias He <[email protected]>
---
 tools/kvm/virtio/blk.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/virtio/blk.c b/tools/kvm/virtio/blk.c
index d9e15a9..a7abcf0 100644
--- a/tools/kvm/virtio/blk.c
+++ b/tools/kvm/virtio/blk.c
@@ -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)
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to