Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp703965yba; Fri, 3 May 2019 09:08:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/b56Rc8PeEFfBLXAvId2A7/vPvdb4eCAPnUEcRBas60KLuiEk+yA8W2aFRmoUHl2Pkv7s X-Received: by 2002:a17:902:2aa8:: with SMTP id j37mr11532525plb.164.1556899683251; Fri, 03 May 2019 09:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556899683; cv=none; d=google.com; s=arc-20160816; b=QlQJj8yhKVYXoyv8f3U+dV6A317pJqM1cdipuzazM5ki1oDvMSITywvUze3tNE2jTo Y2CU2IXlYKiFySOTG3Egh1/wfazoKE+rEj/+gw8eiBS50hPo8ZkxlHSW4sniLEIHHhtK Qr+noDl9UB4U5yzUWlALk15S4O/0O3XRMobf8LdIbPECaIexOzkp204zuCMjxlS7QGPp jIQD6cKeNNASYT7V7WG0H4gVIzwdOrAlbOnZvvP0qOQK/elkuI1wtFGrbyR2VQfbHrIE q4GNkE9XD3bqpa9KwFSUF+Vi1Wim2UZol0+LaUl4p2TKg1a/5KC9XNuh7cKpaMGjvG6f XJ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qVSVUCRNN0gnKBWwa4yHaRgVVYEkRXPU4Vvw/cEzW6U=; b=uCbKetkPXLKKVhz4EAm1AVkWoUUcRqHwWCCHipM+iF1xag8+wye2cnkJlj8/VcK6TQ OB9pCrDlhd7InVPyhcMCevbY1c5tItMe1exPUGNT8pad6NVsUbJ86x2wM9Ojoewj9DA1 c7JUofZO2FdwVmTjdJHoCX6j7GjHF0WlfJK5Q5Xun8ZRa9DXnP7X35BSodsbgY91LT5A XGDXbB1QDeoIjXIaktBxmwKsPgdxVa/iFh4wh/sW6zZPd8ioHmlHcGK28tEY7vYh0GyA eyId1HDvkvj8639ul5N2xa6YEa8KjLv8Oiy2hlD/MY5zGCtuf/stk2EAitJF7BQDtE2S D6vg== 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 o19si2735315pgk.324.2019.05.03.09.07.46; Fri, 03 May 2019 09:08:03 -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 S1728273AbfECPxO (ORCPT + 99 others); Fri, 3 May 2019 11:53:14 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36020 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728246AbfECPxO (ORCPT ); Fri, 3 May 2019 11:53:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 28935374; Fri, 3 May 2019 08:53:14 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2300B3F557; Fri, 3 May 2019 08:53:11 -0700 (PDT) Date: Fri, 3 May 2019 16:53:06 +0100 From: Lorenzo Pieralisi To: Srinath Mannam Cc: Bjorn Helgaas , Robin Murphy , Joerg Roedel , Eric Auger , poza@codeaurora.org, Ray Jui , bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 0/3] PCIe Host request to reserve IOVA Message-ID: <20190503155306.GA6461@e121166-lin.cambridge.arm.com> References: <1556892334-16270-1-git-send-email-srinath.mannam@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556892334-16270-1-git-send-email-srinath.mannam@broadcom.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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