From patchwork Tue Feb 3 06:30:00 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: 5766521 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1F8069F380 for ; Tue, 3 Feb 2015 07:04:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47B8820A6C for ; Tue, 3 Feb 2015 07:04:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71D5C20A6B for ; Tue, 3 Feb 2015 07:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934025AbbBCHEJ (ORCPT ); Tue, 3 Feb 2015 02:04:09 -0500 Received: from mail-oi0-f54.google.com ([209.85.218.54]:54826 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933960AbbBCHDK (ORCPT ); Tue, 3 Feb 2015 02:03:10 -0500 Received: by mail-oi0-f54.google.com with SMTP id v63so47803072oia.13 for ; Mon, 02 Feb 2015 23:03:09 -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=yRQz9L9Z18XpUldDyjAn+G//SF5Z8XbY5O7Zoa8SRsA=; b=a2fel89CETnNKwa8Tue4cbi6hW+0zdPZK/rvJIoyXH+TVPjablRaM8N4hjDmV4ZLZz i+thNo4N6XkB5rJzq7SWlhEiGWIabdC1K1ErlpyYeq6Uag7ZnHdZvZ4m0mGau/Q+G5i6 d5aTaq9h3rSoX0mWc5l3xlp4tWp0ZXhk95C1K2LKz6jT8L/XH9Lrd7+yX/ghm8AzLh1X +n16iNmQmrXDKamRQqwS/eu9hvnnzXPORiEUHgnxoTUTXsGLURvAmbvveWELNowRJCBE xulYaDEgggCeD/aXMnoqhXYBSDV9NdY7KZNxiC74Fecw6F17nz4oZWKWWPhrSbkcxWDE BxoA== X-Gm-Message-State: ALoCoQkfZR8IVIxzvILL1y331ETqbOOVNKbKm8I8FoZJeWVdMkrxh2L91+iGvlslu4pVTvwVzq17 X-Received: by 10.202.88.132 with SMTP id m126mr11107334oib.57.1422946989868; Mon, 02 Feb 2015 23:03:09 -0800 (PST) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id t8sm10657870obv.22.2015.02.02.23.03.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 23:03:09 -0800 (PST) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , kvm-devel , Paolo Bonzini , "Michael S. Tsirkin" , Al Viro , Christoph Hellwig , Nicholas Bellinger Subject: [PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits Date: Tue, 3 Feb 2015 06:30:00 +0000 Message-Id: <1422945003-24538-7-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1422945003-24538-1-git-send-email-nab@daterainc.com> References: <1422945003-24538-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 Acked-by: Michael S. Tsirkin --- 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 e1fe003..c25fdd7 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -173,7 +173,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 @@ -1626,7 +1628,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)