diff mbox

[V3,3/3] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported

Message ID 1437544792-3949-4-git-send-email-jasowang@redhat.com
State New
Headers show

Commit Message

Jason Wang July 22, 2015, 5:59 a.m. UTC
Chapter 6.3 of spec said

"
Transitional devices MUST offer, and if offered by the device
transitional drivers MUST accept the following:

VIRTIO_F_ANY_LAYOUT (27)
"

So this patch sets VIRTIO_F_ANY_LAYOUT when 1.0 is supported.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/block/virtio-blk.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 4716c3e..2e7a190 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -736,6 +736,7 @@  static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features,
             error_setg(errp, "Virtio 1.0 does not support scsi passthrough!");
             return 0;
         }
+        virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT);
     } else {
         virtio_add_feature(&features, VIRTIO_BLK_F_SCSI);
     }