From a6d4a0655dfd235401d570187faf9bbcbf76fcbb Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 30 Sep 2015 10:25:09 +0200 Subject: [PATCH 01/11] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-id: <1443608650-22364-2-git-send-email-mst@redhat.com> Patchwork-id: 67997 O-Subject: [RHEL-7.2 qemu-kvm-rhev PATCH v2 1/9] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device Bugzilla: 1276100 RH-Acked-by: Xiao Wang RH-Acked-by: Marc-André Lureau RH-Acked-by: Thomas Huth RH-Acked-by: Marcel Apfelbaum From: Jason Wang 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 only clear VIRTIO_F_LAYOUT for legacy device. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Paolo Bonzini (cherry picked from commit c9b11f971cfa1fd3eed716f62f4b835553b75490) Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Miroslav Rezanina --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 2aa6ad6..62b617e 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -727,13 +727,13 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY); virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY); virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE); - virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT); if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { if (s->conf.scsi) { error_setg(errp, "Please set scsi=off for virtio-blk devices in order to use virtio 1.0"); return 0; } } else { + virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT); virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); } -- 1.8.3.1