From patchwork Fri Jan 30 08:12:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 5747801 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C67E1BF440 for ; Fri, 30 Jan 2015 08:45:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A6F0201CE for ; Fri, 30 Jan 2015 08:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D758201BB for ; Fri, 30 Jan 2015 08:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759934AbbA3Ipq (ORCPT ); Fri, 30 Jan 2015 03:45:46 -0500 Received: from mail-oi0-f50.google.com ([209.85.218.50]:37028 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759939AbbA3Iph (ORCPT ); Fri, 30 Jan 2015 03:45:37 -0500 Received: by mail-oi0-f50.google.com with SMTP id h136so33740924oig.9 for ; Fri, 30 Jan 2015 00:45:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Cmx8YqYN5788WSunUHxe7QVIndzvX8lrx812yLAxVEg=; b=RJKZCsNnjnNzQIqrjNnRbjyvKkQdUAPLvLZylhk17ajiGaCPoDbArfFs+T8OGr1TGI TzTGxuSzLhIB8wva4xU8Dk1/61FA4ezsNFgLyp7o1RPlne6EzmWtAYMjJ4PuToFddGQV 1VeeRnVBn3XKVF68fjwGrBJOnAhDzB1qZ2ckyymJ2vbP1ePLjshaZRb0phJnF46s5mzP mx/mNE6MjTzUEiDIu8FMdqO5P/kfEXZg6Yxh+4tvT82CITqr7n65Afh+K0ZRHJgNIM/z XA6NJZlbhP+kmhr74aE14tFRwxDDRPA54jNJcoNSq1p3y1OzpwwvP3IxuHIMQPDxdOT+ D7zg== X-Gm-Message-State: ALoCoQmDE5lnjcRWuBiHZjwQFBQ2O0v2HrEdmxcW8jFgisVQ9rNM3cJGjHNWbBgRetmTckdBHlTa X-Received: by 10.202.95.7 with SMTP id t7mr2922219oib.104.1422607536930; Fri, 30 Jan 2015 00:45:36 -0800 (PST) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id l3sm5046132obx.14.2015.01.30.00.45.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 00:45:36 -0800 (PST) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , kvm-devel , Paolo Bonzini , "Michael S. Tsirkin" , Nicholas Bellinger Subject: [PATCH 8/8] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits Date: Fri, 30 Jan 2015 08:12:32 +0000 Message-Id: <1422605552-24797-9-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1422605552-24797-1-git-send-email-nab@daterainc.com> References: <1422605552-24797-1-git-send-email-nab@daterainc.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nicholas Bellinger Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits required for virtio-scsi 1.0 spec layout requirements. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 206f4ef..a773af3 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -171,7 +171,9 @@ enum { /* Note: can't set VIRTIO_F_VERSION_1 yet, since that implies ANY_LAYOUT. */ enum { VHOST_SCSI_FEATURES = VHOST_FEATURES | (1ULL << VIRTIO_SCSI_F_HOTPLUG) | - (1ULL << VIRTIO_SCSI_F_T10_PI) + (1ULL << VIRTIO_SCSI_F_T10_PI) | + (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_VERSION_1) }; #define VHOST_SCSI_MAX_TARGET 256 @@ -1644,7 +1646,10 @@ static void vhost_scsi_handle_kick(struct vhost_work *work) poll.work); struct vhost_scsi *vs = container_of(vq->dev, struct vhost_scsi, dev); - vhost_scsi_handle_vq(vs, vq); + if (vhost_has_feature(vq, VIRTIO_F_ANY_LAYOUT)) + vhost_scsi_handle_vqal(vs, vq); + else + vhost_scsi_handle_vq(vs, vq); } static void vhost_scsi_flush_vq(struct vhost_scsi *vs, int index)