Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp56392imm; Thu, 30 Aug 2018 06:56:17 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdadg+Dfwcw+mQrE/0sDHv2TXTDbZBZHWShH5rWJiFZzjIGLhSjoT5KMolBa3H5MdYC8GI+o X-Received: by 2002:a63:fe02:: with SMTP id p2-v6mr10057382pgh.148.1535637377581; Thu, 30 Aug 2018 06:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535637377; cv=none; d=google.com; s=arc-20160816; b=Xrd3Z7HnaPSCUzULrJ6VHxBPPQr9YUCi5+TylSu/1ooDB2tchIx3NDj+0HyiBNOejp tXuw+KGImpccUN9a3gNDcJA3OEexihLcJQYY4atGYJkmst1M0Fh4s4M/qeVT+JuAZHvf Qs2DeddMDZoRU2Ya34J4pz1E47/SKHfn9uKkBbEIG+iFay55KL/TNm+7NjTUYvxYlMIy YqRfSpBoMl5sORZVQAAGu0pfMdvIowLo2XUyOZhyYoQUns1gTDIM2OthMnzjkxjscEia Psk1b1k/1axDkA2OSsdbZOHly/6y+hpDRtOFN9VRNP2h43BI06wmS1NUaLduG/Xy8YQF esGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=FFrgYrj00Tp5CkJmXMCnQ28//YPIycij1wGEQHb/n3U=; b=B9GXv6eW0y1wRtUwdp6Qn1RO6bvtigg5yNSW9GXwj2utglBn8088t5m1fCwu2kpx3T IjZnU+30p3YAESlViMiXHwO7z7GgMBwaW/tnkJef7JZG83O7TkHHtUe9KSRVFnLAeQ9M FU1MpfevXazQlbz396p8edN7++QEQH0fm3/LtJDw6yLnBt+pAkabuFN1zRcZEmdC1tLh U7xO9r9/ZbaWzk81Wd+Dt91JQZ6/u98Q//jHEI+RE3BYjxtCyOTzCUoe7SC9u9SpRJLs +UPlRwnlUo7PYYgd+qAKUWT47ArxoHynJ76dR4gO5nziRWBHNjY4gucinelVCLgCzKUs 7Ndw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3-v6si6792155pgb.119.2018.08.30.06.55.57; Thu, 30 Aug 2018 06:56:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729000AbeH3Rz5 (ORCPT + 99 others); Thu, 30 Aug 2018 13:55:57 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:39069 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728722AbeH3Rz4 (ORCPT ); Thu, 30 Aug 2018 13:55:56 -0400 Received: by mail-qt0-f193.google.com with SMTP id o15-v6so9847318qtk.6; Thu, 30 Aug 2018 06:53:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FFrgYrj00Tp5CkJmXMCnQ28//YPIycij1wGEQHb/n3U=; b=WioOFLq+bLa+ZJifZUsbcWhbnz6dXrC1f6v3oLagyiCk8reaULW1dly8/W7RPHymgQ awHz1SLBiaPDbR2ljRZYYyrAd8Ot3dzWQAJ+Apb8wQ44BXJwVOhZTeV0LRpM90vRFT0C nk6Dd3PeEckS1UDXO9Ch0M2xVzedcRLLI3EQFP4oNKVttbS2vDHpxHEZL0EID4wmZacd n+5E9rHLsZN5E9rVLghryAeFBt5GHdD8f2GMXWiH6EqFd1DjWo//pnGaDgfOGmwm3MKj o7CveDjUnkVrfhr+T7So5HChqTUbKKVMqp3WVkumKX0Y/Y8+xCCfqCQf8urOqziqrtW2 V+Bg== X-Gm-Message-State: APzg51DSHaOANlR/g95Z4CD+W2QVgzRRyI8r7xNeuOEWKC0I087RlbRg 3sRKHRmi8UuaiIZ4FZ5Jl0Z/LqMscOFZIEP7cG8= X-Received: by 2002:a0c:a8cc:: with SMTP id h12-v6mr11709208qvc.161.1535637221513; Thu, 30 Aug 2018 06:53:41 -0700 (PDT) MIME-Version: 1.0 References: <1535453838-12154-1-git-send-email-sunil.kovvuri@gmail.com> <1535453838-12154-11-git-send-email-sunil.kovvuri@gmail.com> In-Reply-To: From: Arnd Bergmann Date: Thu, 30 Aug 2018 15:53:25 +0200 Message-ID: Subject: Re: [PATCH 10/15] soc: octeontx2: Reconfig MSIX base with IOVA To: Sunil Kovvuri Cc: Linux Kernel Mailing List , Olof Johansson , Linux ARM , linux-soc@vger.kernel.org, gakula@marvell.com, sgoutham@marvell.com, Thomas Gleixner , Marc Zyngier , Jason Cooper , linux-pci Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 28, 2018 at 3:17 PM Sunil Kovvuri wrote: > On Tue, Aug 28, 2018 at 6:27 PM Arnd Bergmann wrote: > > On Tue, Aug 28, 2018 at 2:42 PM Sunil Kovvuri wrote: > > > On Tue, Aug 28, 2018 at 5:39 PM Arnd Bergmann wrote: > > > > On Tue, Aug 28, 2018 at 12:58 PM wrote: > > > > > > This admin function is a PCI device which is capable of provisioning > > > HW blocks to other PCIe SRIOV devices in the system. Each HW block > > > (eg memory buffer pools, NIC dewscriptors, crypto engines e.t.c) needs > > > certain no of MSIX vectors. Admin function has a set of 32K MSIX vectors > > > in memory (not on-chip) which based on HW block provisioning to a PCI device > > > attaches the required number of vectors to that device. Some part of this > > > configuration is done by low level firmware. > > > > > > RVU_AF_MSIXTR_BASE points to the memory region allocated for 32K MSIX > > > vectors. If kernel is booted with IOMMU enabled and admin function device > > > is attached to SMMU, HW will go through translation to access this MSIX > > > vector memory region. Hence the mapping done in this patch. > > > > Do you mean this is not a regular PCIe MSI-X interrupt to the GIC, but > > something internal to your device that gets routed through the IOMMU > > back into the device? > > > > This is a regular PCIe MSI-X interrupt, the difference is that the > bunch of PCI devices > here doesn't have a fixed set of MSIX vectors. Admin function has a > memory region with > 32K MSIX vectors which it provisions to PCI devices based on the HW > functional blocks > attached to them. A PCI device which works as a ethernet device needs > X number of vectors > and a crypto device needs Y number of vectors. > > Since the admin function owns the whole MSIX vector region, HW uses > this device's stream ID > to access the vectors. Hence the IOMMU mapping. Once MSIX vectors are > provisioned to > a PCI device they work as normal MSIX interrupt like any other device. Ok, I think I got it now, just to confirm: the MSIX vectors you allocate in the admin device refer to memory backing the BAR that contains the MSI-X entries of the other functions, right? I was a bit confused here and assumed that you were mapping the MMIO area of an interrupt controller that receives the interupt transactions. Arnd