From patchwork Mon Feb 24 05:32:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 3706401 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43E8BBF13A for ; Mon, 24 Feb 2014 05:56:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 693E120171 for ; Mon, 24 Feb 2014 05:56:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7346920160 for ; Mon, 24 Feb 2014 05:56:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860AbaBXFyb (ORCPT ); Mon, 24 Feb 2014 00:54:31 -0500 Received: from mail-ob0-f172.google.com ([209.85.214.172]:53938 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751900AbaBXFy2 (ORCPT ); Mon, 24 Feb 2014 00:54:28 -0500 Received: by mail-ob0-f172.google.com with SMTP id gq1so57753obb.31 for ; Sun, 23 Feb 2014 21:54:27 -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=wr+g07LBvq0hlIa5sgY7Boq/TzrmmJKgDlOV4c5AqAw=; b=RwWqj+YsxMFcMkH3mpjXT6EKVUf0nwifE5JQ5UHdn5SDJk+iW3gTwAwfPRAjxNqcEf pPVFpFmjitapx6qS3/I2wgymb+MVjwLxFaR9FdWKsmoynrB8gNrby85CU/+7ZPk/zi9I wtdAJ6FWLHG3T+fqoVBU81tlubeXzCtRDnkgvcnDR16d5CQRPdNZDoOV3CNA6a34T6bq NIUnqe61Dv0sFH6K/leZhbQDDFk5Z7gAC6YYf0Zm8q1Y8nmhGMZI2adLOo0AIVtlIwOu wqmdO0GDAxsva6JrdjibywmEu4C/7Xs43yuBjpZWTe1Of/qGCs2lUVAZcSMX3wkeAoOk ERHQ== X-Gm-Message-State: ALoCoQkwQRL92k86EH5rGMUMkwYs+Ag3mwr0m16OdGOPRH2phl5SOCHbeQNxNIsUVVueFf5r0lV2 X-Received: by 10.60.131.141 with SMTP id om13mr19896206oeb.68.1393221267465; Sun, 23 Feb 2014 21:54:27 -0800 (PST) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id tr10sm31941566obb.6.2014.02.23.21.54.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 23 Feb 2014 21:54:26 -0800 (PST) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , linux-kernel , kvm-devel , "Michael S. Tsirkin" , Paolo Bonzini , "Martin K. Petersen" , Christoph Hellwig , Hannes Reinecke , Sagi Grimberg , Nicholas Bellinger , Sagi Grimberg Subject: [RFC 5/6] vhost/scsi: Add new VIRTIO_SCSI_F_T10_PI feature bit Date: Mon, 24 Feb 2014 05:32:29 +0000 Message-Id: <1393219950-18613-6-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1393219950-18613-1-git-send-email-nab@daterainc.com> References: <1393219950-18613-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=-3.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, 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 This patch adds a VIRTIO_SCSI_F_T10_PI feature bit for signaling host support of accepting T10 protection information SGLs from virtio-scsi guest. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c | 3 ++- include/linux/virtio_scsi.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 3bdb625..734a76c 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -169,7 +169,8 @@ enum { }; enum { - VHOST_SCSI_FEATURES = VHOST_FEATURES | (1ULL << VIRTIO_SCSI_F_HOTPLUG) + VHOST_SCSI_FEATURES = VHOST_FEATURES | (1ULL << VIRTIO_SCSI_F_HOTPLUG) | + (1ULL << VIRTIO_SCSI_F_T10_PI) }; #define VHOST_SCSI_MAX_TARGET 256 diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h index 4195b97..dc3764b 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h @@ -97,6 +97,7 @@ struct virtio_scsi_config { #define VIRTIO_SCSI_F_INOUT 0 #define VIRTIO_SCSI_F_HOTPLUG 1 #define VIRTIO_SCSI_F_CHANGE 2 +#define VIRTIO_SCSI_F_T10_PI 3 /* Response codes */ #define VIRTIO_SCSI_S_OK 0