From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEWZz-0006LM-Kk for qemu-devel@nongnu.org; Mon, 13 Jul 2015 01:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEWZy-0006Ja-Tv for qemu-devel@nongnu.org; Mon, 13 Jul 2015 01:47:03 -0400 From: Jason Wang Date: Mon, 13 Jul 2015 13:46:49 +0800 Message-Id: <1436766411-29144-3-git-send-email-jasowang@redhat.com> In-Reply-To: <1436766411-29144-1-git-send-email-jasowang@redhat.com> References: <1436766411-29144-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PATCH 3/5] virtio-blk: set VIRTIO_F_ANY_LAYOUT when 1.0 is supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, mst@redhat.com Cc: Kevin Wolf , Jason Wang , qemu-block@nongnu.org, Stefan Hajnoczi 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 Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Jason Wang --- hw/block/virtio-blk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index f30ad25..0f07e25 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -732,6 +732,8 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features) virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE); if (!__virtio_has_feature(features, VIRTIO_F_VERSION_1)) virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); + else + 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