[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH V2 5/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0
From: |
Jason Wang |
Subject: |
[Qemu-block] [PATCH V2 5/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported |
Date: |
Wed, 15 Jul 2015 13:30:01 +0800 |
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 <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
---
hw/block/virtio-blk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 4a0ef68..78b1f1e 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -738,6 +738,9 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev,
uint64_t features,
}
virtio_add_feature(&features, VIRTIO_BLK_F_SCSI);
}
+ if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) {
+ virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT);
+ }
if (s->conf.config_wce) {
virtio_add_feature(&features, VIRTIO_BLK_F_CONFIG_WCE);
--
2.1.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-block] [PATCH V2 5/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported,
Jason Wang <=