From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 303E1C3A5A2 for ; Tue, 3 Sep 2019 16:33:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9A432339D for ; Tue, 3 Sep 2019 16:33:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gXA92M+q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730833AbfICQdg (ORCPT ); Tue, 3 Sep 2019 12:33:36 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38984 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730823AbfICQdc (ORCPT ); Tue, 3 Sep 2019 12:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E7M5OHCPCFGvSidMPlknkuDvFUT36qFbZFw1uswvZFM=; b=gXA92M+qRj1oJOmfHj6Hbgihwb cXmqRb2s7gGx0C3dDRwlGKMVyI6YboNSetcl7skx30OYn1TxPXw1SYH1oVICQI+ywmWooxbiZ7GMF QJg1x4zpoXkD7fjvz5f5bU9LLFTSO4JXBhcAt+N2PBRJBPrl76Ifgm7fAL5ZUIe8cfQ0el5gFkSqS 6hUqq3sLNdf68QBmQPzxIA1u1VMnfMiyGe9mCq8q/wPxumMAvikntDCAkUnnoku6Te9C4D1SdlDu9 ZA9J1RytDuqMtBsvyAbh0aQOBCUoe5358UC5SYyR9PqdJHoSR6tVDOGYCGzmS99eScsOwkm+2z9cO HKkGg5rA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i5BkJ-0003C9-U1; Tue, 03 Sep 2019 16:33:31 +0000 Date: Tue, 3 Sep 2019 09:33:31 -0700 From: Christoph Hellwig To: =?utf-8?B?0JDQvdC00YDQtdC5INCb0LXQvtC90YfQuNC60L7Qsg==?= Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Andrei Leonchikov Subject: Re: [PATCH 1/1] Fix ARI enabling for a NVME devices Message-ID: <20190903163331.GA32703@infradead.org> References: <20190903125315.10349-1-andreil499@gmail.com> <20190903131416.GA26756@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [adding back the Cc list] On Tue, Sep 03, 2019 at 07:24:15PM +0300, Андрей Леончиков wrote: > All drives has ARI capability, but everywhere the PCI_EXP_DEVCAP2_ARI > in the DEVCAP2 register is reset (see NVMe specification, bit 5). > At the same time, when the device is initialized, the DEVSAP register is > requested and this bit is checked. And if it is reset, ARI will never turn > on. > Because of this, it will be impossible to correctly initialize more than 8 > functions per interface (1 physical and 7 virtual). > At the moment we are developing a disk, one of the requirements for > which is the correct operation of up to 128 virtual functions on one > interface. > During testing of this device, this behavior was noticed. Looking at the PCIe spec this bit actually means "ARI forwarding supported" and isn't the actual ARI support. And the PCIe spec says about that: "Applicable only to Switch Downstream Ports and Root Ports; must be 0b for other Function types. This bit must be set to 1b if a Switch Downstream Port or Root Port supports this optional capability. See Section 6.13 for additional details." So I don't see how we'd ever see this bit set on an actual NVMe device. And yes, the name for our define is a little misnamed.