Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp709405yba; Fri, 3 May 2019 09:12:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg9R4RamkW7cjCDZGyN1YE5Kitw3XRUsQ7jKA6dxjOTa9k+/0F7EJEViSTbab6jqReUaGi X-Received: by 2002:a65:628b:: with SMTP id f11mr10969959pgv.95.1556899925080; Fri, 03 May 2019 09:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556899925; cv=none; d=google.com; s=arc-20160816; b=n9QGucbkPWuMwql4ZbcuSXp4oDCtQlf5wILlOwjL3jIc08DeYlRBsE7EoSYyFoow3k w2+ZFQ7UhZPK4SI32kMgj+gdn8G/Y4CLrPCXGPWZkpKCzvWMGGE+a1IGO5j+VcKyYabh UKVUCdZ4LzvQ2hIUY7d6JFtrm2X77GyLqs6VckImvjEPF72AwbNb+0VdNB2JxNa2gzkW Qzn8I92gebhb0+vzdIL3Sjp+DadZQMOLmcGQsKHBXgJkS7NIhlD3vu03V/FHw53v3jMG 9xiTza4IIQ1hSeL2XGH3opNVvDWpx269PNGpl+MCU0SXfYjMia49QbTizmu2d2EIM34U BQfQ== 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; bh=VC/Snkdb47YXCrhgoVCm8m87mFow4IXpldKitSIRUm4=; b=z0JPALT6tY0Zn7AdzizUNgQTVH4gDy3ec83R5vVq9MJXYS0t6RWORtw65nB3a+DMXC MMj6+6imkxTFBotW2PZLp/7Kp2/MCCIkGq+OaLiQiXIMST1LKBmMFJbGIKRPgNFti3GT an/DhU8YKOMLMmgi3K+IGeUOEOLGrv3L1J35mk/RNGTAVGmbFqZJFyBWOKTDBOZhFT+T 1tAZ8kwCmwR//Ep6Nibr7HjhkdzDCyGDqpNm/1v2l88tLx+JNmvLroxqKPDFrq2TGnQn PojTGgA0PZywj7Of8dBoUM3HEotEMZ0M5fHtdzBeil0J7IcMNfLJK0fwtQeyNgSGnMqB 9y1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=WPW2uuEQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si2940130plt.95.2019.05.03.09.11.49; Fri, 03 May 2019 09:12:05 -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=@broadcom.com header.s=google header.b=WPW2uuEQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbfECQG5 (ORCPT + 99 others); Fri, 3 May 2019 12:06:57 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40950 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbfECQG5 (ORCPT ); Fri, 3 May 2019 12:06:57 -0400 Received: by mail-wm1-f67.google.com with SMTP id h11so7334580wmb.5 for ; Fri, 03 May 2019 09:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VC/Snkdb47YXCrhgoVCm8m87mFow4IXpldKitSIRUm4=; b=WPW2uuEQYZhVva1B/kFnzPjaUlaLUB7LHz6G2b/8uJ84ih5o3328e4rXxAUboiXgUM J/wO/bHE9XT2eWIiMQWFFY5/3GImZUeiGivUZ/JkzYISpmhpqGhUZgckgutcZLdPVu2S UhqkY4W/e+7AWHeB+jtIcDwEjVA+2jagvE048= 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=VC/Snkdb47YXCrhgoVCm8m87mFow4IXpldKitSIRUm4=; b=K0YppmAOMxnALdkdSzmGjVk5LOm0jnftfUrePYELg+daE0D4/LrJ3tz4iRX81tkGmM r2hbAw4110gKHP0cYZpNq/j6yeUueCKpf8yyPtAmMP2dl5OkK8jxvgrLC0PRaPBWey2C 7aHjb0zE8IUnkQwigEFNuAJ1A8terpWtbCG5plKcjjddtL6iJib82N2BwdYJju101fsZ FD25glp5j2Q2wPOw2TiSVfPde88NN+dFV8iEWliyZGZBhNc6xpnCeqXxD06bLThtJnXs p9sdf56o2s9ckAIviv2uO3I+E4ZxNRDnBcPLowpezL1CqQs2CVqqK7AoJb6+Cfifmd3b 9/og== X-Gm-Message-State: APjAAAXnuvADsVMen+Xk5QkpAd/Omiw7fJ5DK9NbywO4H5uNzZsNKIZh 7PfKbFRoFAEOMGIj06Pik6nCXyGikjzsGG6SN9f76g== X-Received: by 2002:a05:600c:204d:: with SMTP id p13mr7183118wmg.53.1556899615681; Fri, 03 May 2019 09:06:55 -0700 (PDT) MIME-Version: 1.0 References: <1556892334-16270-1-git-send-email-srinath.mannam@broadcom.com> <20190503155306.GA6461@e121166-lin.cambridge.arm.com> In-Reply-To: <20190503155306.GA6461@e121166-lin.cambridge.arm.com> From: Srinath Mannam Date: Fri, 3 May 2019 21:36:44 +0530 Message-ID: Subject: Re: [PATCH v6 0/3] PCIe Host request to reserve IOVA To: Lorenzo Pieralisi Cc: Bjorn Helgaas , Robin Murphy , Joerg Roedel , Eric Auger , poza@codeaurora.org, Ray Jui , BCM Kernel Feedback , linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, Linux Kernel Mailing List 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 Hi Lorenzo, Thanks a lot. Regards, Srinath. On Fri, May 3, 2019 at 9:23 PM Lorenzo Pieralisi wrote: > > On Fri, May 03, 2019 at 07:35:31PM +0530, Srinath Mannam wrote: > > This patch set will reserve IOVA addresses for DMA memory holes. > > > > The IPROC host controller allows only a few ranges of physical address > > as inbound PCI addresses which are listed through dma-ranges DT property. > > Added dma_ranges list field of PCI host bridge structure to hold these > > allowed inbound address ranges in sorted order. > > > > Process this list and reserve IOVA addresses that are not present in its > > resource entries (ie DMA memory holes) to prevent allocating IOVA > > addresses that cannot be allocated as inbound addresses. > > > > This patch set is based on Linux-5.1-rc3. > > > > Changes from v5: > > - Addressed Robin Murphy, Lorenzo review comments. > > - Error handling in dma ranges list processing. > > - Used commit messages given by Lorenzo to all patches. > > > > Changes from v4: > > - Addressed Bjorn, Robin Murphy and Auger Eric review comments. > > - Commit message modification. > > - Change DMA_BIT_MASK to "~(dma_addr_t)0". > > > > Changes from v3: > > - Addressed Robin Murphy review comments. > > - pcie-iproc: parse dma-ranges and make sorted resource list. > > - dma-iommu: process list and reserve gaps between entries > > > > Changes from v2: > > - Patch set rebased to Linux-5.0-rc2 > > > > Changes from v1: > > - Addressed Oza review comments. > > > > Srinath Mannam (3): > > PCI: Add dma_ranges window list > > iommu/dma: Reserve IOVA for PCIe inaccessible DMA address > > PCI: iproc: Add sorted dma ranges resource entries to host bridge > > > > drivers/iommu/dma-iommu.c | 35 ++++++++++++++++++++++++++--- > > drivers/pci/controller/pcie-iproc.c | 44 ++++++++++++++++++++++++++++++++++++- > > drivers/pci/probe.c | 3 +++ > > include/linux/pci.h | 1 + > > 4 files changed, 79 insertions(+), 4 deletions(-) > > I have applied the series to pci/iova-dma-ranges, targeting v5.2, > thanks. > > Lorenzo