From patchwork Mon Feb 2 04:06:31 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: 5759181 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 AF096BF440 for ; Mon, 2 Feb 2015 04:40:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA1AA2026F for ; Mon, 2 Feb 2015 04:40:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC76520266 for ; Mon, 2 Feb 2015 04:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932488AbbBBEkP (ORCPT ); Sun, 1 Feb 2015 23:40:15 -0500 Received: from mail-ob0-f171.google.com ([209.85.214.171]:51178 "EHLO mail-ob0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932304AbbBBEjn (ORCPT ); Sun, 1 Feb 2015 23:39:43 -0500 Received: by mail-ob0-f171.google.com with SMTP id gq1so6080068obb.2 for ; Sun, 01 Feb 2015 20:39:43 -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=vh1gTEijmW4mejo5oAKuJz+TuFoCurRaKieCovkaNss=; b=FX3jT2lVIzHHG+j/YTwJ+cRNZz8DTtLlD+Xf4h9XOHpjxtMhmOIVZORRcroA+m/4X4 5yZgmzGHe7J/by4hphGlEOyvtOoaRgguDK3eiBHIZEjqR7cXqtb35Ad7lvSjedUq/wdU 2/MXWMSPr5342hUT/PQ1Ky5sUI3JCLeUmKXzNn+3S/9fUedJXOvp2ogEDP3VxZPh64vg PeKh0QPfBOG8gcHXRFG9e82RbsWJSd5Ldcs+kQh8sG+AP9+eC2FGBBc+ktzj4CJum/6E OwrxbLRpjfSuW3KYt0p1urRd4XdSrySdxaC63gZwSE3WEitcCKTl4K+KJ6xM+UB0t67o Jd0g== X-Gm-Message-State: ALoCoQkitmS+mdSFtPYAMpatAcH3j4zOP4JuKK00m9rqOjUud4Gt/B7oLkq9a1TMlMlaRt0NRx9T X-Received: by 10.182.96.163 with SMTP id dt3mr10953656obb.6.1422851983347; Sun, 01 Feb 2015 20:39:43 -0800 (PST) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id y2sm8950007oei.1.2015.02.01.20.39.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 01 Feb 2015 20:39:43 -0800 (PST) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , kvm-devel , Paolo Bonzini , "Michael S. Tsirkin" , Nicholas Bellinger Subject: [PATCH-v2 08/11] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits Date: Mon, 2 Feb 2015 04:06:31 +0000 Message-Id: <1422849994-3419-9-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1422849994-3419-1-git-send-email-nab@daterainc.com> References: <1422849994-3419-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 a20a5fd..25a07a9 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 @@ -1693,7 +1695,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)