Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp195483imm; Thu, 30 Aug 2018 11:40:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYZ8Df5HaExrqKSlwjrTerbT5IqzvSa8jko+8czq7hMrfQdBYk907QDJTSdP8qsMIrh/db+ X-Received: by 2002:a17:902:246a:: with SMTP id m39-v6mr11232118plg.57.1535654437722; Thu, 30 Aug 2018 11:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535654437; cv=none; d=google.com; s=arc-20160816; b=g3YKJbvRsM55aoem2d/fn/XVkO38FFx7brdhuj439nYBAhdzN+xXMWBZGprCzKcGYu yCfgcjLYzBGb5yVrUEBc6N/EC7oi9wo3i3hEmu3YgDLZNjZNKU7gVIXMo/qeVCLEVO2+ eggqWie1OgUypKhW0QhKy9R/A3oLibwAXIUSd3aEodJKEs5NckLWSifV4LEPImIclyVS bluxH2CCPab6IV166P3/1OXqbq1/8u4YZ/jHakqFcQeX/zQ1BWtYW0bj+Fcg4yp61MXZ 1DQdL8YVhtRTMOA93hGoUB/BOxx6Sn+ZYKKKfWHDTPABBfjBY2Jl5I20D7Gc0+g699ka A0XQ== 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:dkim-signature :arc-authentication-results; bh=r/TK9cJYQEjith+IGSroY3ICqS1J8Z5IrwrdPpRNhJ4=; b=Z3dsIE8cjZYPrP3NgdWh8HcCgR3uB2ACrozGG/dwohkWjofxBkYyjkTW84B8D4Wzdn ZcmGDuGF/LAYcYTH+/rCp1jCVX3Kza1CeJnhGCx0UdXh6xbjzSRfCyWWIy5wIU6AeZmx 7ONfcpanylhGWRheHTR9oShZqBQ/8Q6fp4CMkhbNqsM6RlvVLXbQ8W+h7tconMoaqU4f 6RNYhPwrUamC3v692ZxfzjihwidypfIon6ERZQdULsQaY9IlX8vLSeKacJaHfjkQfs+G WSHB3x1epE182oqTp4d4xtOGCEVflQqJ8e+FKkUerlgdxaF8MJdeFiXiSI+7lnoVOTeZ +TKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ds6bkfLw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc3-v6si6553549plb.214.2018.08.30.11.40.23; Thu, 30 Aug 2018 11:40:37 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ds6bkfLw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbeH3Wms (ORCPT + 99 others); Thu, 30 Aug 2018 18:42:48 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34455 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726592AbeH3Wmr (ORCPT ); Thu, 30 Aug 2018 18:42:47 -0400 Received: by mail-wm0-f67.google.com with SMTP id j25-v6so1570828wmc.1; Thu, 30 Aug 2018 11:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r/TK9cJYQEjith+IGSroY3ICqS1J8Z5IrwrdPpRNhJ4=; b=ds6bkfLwOkmMocuE+lTuLNTZ4Cr6yZlTYCX9PbFTX98FkAJTrRYRKbYS9Jr6dUBUio xb2eWiOoKqhTUh2lKyQ+VLs/LeUWyVUUjUVgHOctR15NR1vM6HJ7kCr8ngkaOtV/f+8o OkzFaWDruF8Wt2Mbemimx3KzBt03OZ96Dw+GICgzU/DYR5OWzowzzD+Q+E4u3EMdbtRh SVFlImFuEDm47BOE5i/PwaJz2C1OpANUAihP232hwgBbTYdKF5806WMpHwn0wRC+xOFM P6GtZ4iarL8TCxD3+ZidIpoPhLWtvXPnHahVPQc5Lm9m2+LAG+X0cwBo8zNuIC9Z54Q0 1BBg== 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=r/TK9cJYQEjith+IGSroY3ICqS1J8Z5IrwrdPpRNhJ4=; b=S/owJwadWIpYgK7CzV7GECk9mnyDj96JuiCnAt8t4Hcq3Rr0NPDtxwSZ+XEbpd17DY 2V1Jdn4S3NZ8g17AO6fH4l6h90MRLTkg3F6PQufAVnuP3rH3frBJ2qJH1/ey9R5xLPPN Hjo+oYzmlyj7QHEgEEa9IAQxm+K4DJ3aTVVQjSuo7rX03+btN1WsvrMsPCI0a1+KxsXi CMhDwdceyxqq6jxo6T0BnSndYvWZo1W2Ajw34rLluMrSapjBGIkPKgDyPsZNgxYBu36q K4MOOaJvvCKok75XachgBdDxn6nIhAwEzewMznptvL9cNUUU61IXkMK9LdaV0WQ9Pdrd Tucw== X-Gm-Message-State: APzg51A7YxjNErCJmbsjlIdaGZo97g0qqb3t8Wubcjhwjk4Da4I2XBRZ u7kUq8nBwNYIjhuO+aaWbFfOWlXAYdqZNjU8azc= X-Received: by 2002:a1c:a386:: with SMTP id m128-v6mr2607103wme.139.1535654356181; Thu, 30 Aug 2018 11:39:16 -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: Sunil Kovvuri Date: Fri, 31 Aug 2018 00:09:04 +0530 Message-ID: Subject: Re: [PATCH 10/15] soc: octeontx2: Reconfig MSIX base with IOVA To: Arnd Bergmann Cc: LKML , olof@lixom.net, LAKML , linux-soc@vger.kernel.org, Geetha sowjanya , Sunil Goutham , tglx@linutronix.de, Marc Zyngier , jason@lakedaemon.net, 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 Thu, Aug 30, 2018 at 7:23 PM Arnd Bergmann wrote: > > 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? Yes, that's correct. > > 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