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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70F87C636CC for ; Thu, 16 Feb 2023 07:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=o0Mhd22foXyZmFW/iS+Pv7IEg+Y17n+KZ0OUsm7ugLw=; b=R0xo2CxoCy5Imf AgLCim0e53QL75yk8uxty/Gja0EC9xZPUGC6x7IG93Bca3MkYeGrB6FzWCOUjZKJaxifpsrA8axnx o0qC30PonYYUGSVzkm4BSeCdmJ66Bp2sttrwU2jIthEWNSGK4/aNrZkTB5uFatXfsQWMhTdfWIc8o UiELdqIB5VGfRzEBxh3Y97OYXCgpphYFqtt9Lc4XUW8PzO8U+JOlh8ES+jY8z6MBaSZgoUE076Jlc HSUnhNhIbF027+BbXfvOhUQcgj+VyhApR+lOzqn2ALegxGDvPNSqPRactuz0ThRrScY6WvdvmTI44 ZRZdmBVsAwOG5zLiui8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSYyq-008r7w-Sx; Thu, 16 Feb 2023 07:47:01 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSYyn-008r6P-6T for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 07:46:58 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B87761EC2; Thu, 16 Feb 2023 07:46:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A972C433D2; Thu, 16 Feb 2023 07:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676533616; bh=+zie8DFIW086ciac+xBLGHQtfLEE2mebhKoZUUc3aGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LCOQ4+MXazvsQMFJRVy+maqrEGE9X6jkTr2pA/aWhfbBmvuVtfsnS2mZn+y03mgfM chhfleytQW5kGJUu0M+RD+ezD2Pl//aC7VHybrtlkc3bq8+R1CZdcvslCF6lINsSSE 5tKPI4e2KFHb8VA0ZrWKxIufRC+JWnTG3In9/PKY9vCpAy/Fj7X4+XVhmilJN3ecPm 9g1VYNTv6z/VJJJo3Y34Vq5l/8kEtOMltYSwtRCQliclIsOqH9FdSUZq5BPN3SMIAe 9LYyGQmnMYgQvmYcohC4a+10hz+Sdqh0s8aR0z2ccQGmT4gRKyATnSOJYrZvIlZwXG Wl2AYv14epu2A== Date: Thu, 16 Feb 2023 09:46:51 +0200 From: Leon Romanovsky To: Bjorn Helgaas Cc: Ganapatrao Kulkarni , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, jean-philippe@linaro.org, darren@os.amperecomputing.com, scott@os.amperecomputing.com, Will Deacon , Robin Murphy , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev Subject: Re: [PATCH] PCI/ATS: Allow to enable ATS on VFs even if it is not enabled on PF Message-ID: References: <20230215205726.GA3213227@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230215_234657_301448_E2E72793 X-CRM114-Status: GOOD ( 26.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 16, 2023 at 09:26:15AM +0200, Leon Romanovsky wrote: > On Wed, Feb 15, 2023 at 02:57:26PM -0600, Bjorn Helgaas wrote: > > [+cc Will, Robin, Joerg for arm-smmu-v3 page size question] > > > > On Sun, Feb 12, 2023 at 08:14:48PM +0200, Leon Romanovsky wrote: > > > On Wed, Feb 08, 2023 at 10:43:21AM -0800, Ganapatrao Kulkarni wrote: > > > > As per PCIe specification(section 10.5), If a VF implements an > > > > ATS capability, its associated PF must implement an ATS capability. > > > > The ATS Capabilities in VFs and their associated PFs are permitted to > > > > be enabled independently. > > > > Also, it states that the Smallest Translation Unit (STU) for VFs must be > > > > hardwired to Zero and the associated PF's value applies to VFs STU. > > > > > > > > The current code allows to enable ATS on VFs only if it is already > > > > enabled on associated PF, which is not necessary as per the specification. > > > > > > > > It is only required to have valid STU programmed on PF to enable > > > > ATS on VFs. Adding code to write the first VFs STU to a PF's STU > > > > when PFs ATS is not enabled. > > > > > > Can you please add here quotes from the spec and its version? I don't see > > > anything like this in my version of PCIe specification. > > > > See PCIe r6.0, sec 10.5.1. > > Awesome, I have old versions. OK, where should I read about this sentence? "It is only required to have valid STU programmed on PF to enable ATS on VFs. Adding code to write the first VFs STU to a PF's STU when PFs ATS is not enabled." >From spec: "Smallest Translation Unit (STU) - This value indicates to the Function the minimum number of 4096-byte blocks that is indicated in a Translation Completions or Invalidate Requests. This is a power of 2 multiplier and the number of blocks is 2STU. A value of 0 0000b indicates one block and a value of 1 1111b indicates 231 blocks (or 8 TB total) For VFs, this field must be hardwired to Zero. The associated PF's value applies. Default value is 0 0000b" And enable bit doesn't have any sentence about STU. Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel