From patchwork Tue Apr 9 16:52:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 10891779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA18F17E6 for ; Tue, 9 Apr 2019 17:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E2028932 for ; Tue, 9 Apr 2019 17:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAD302892B; Tue, 9 Apr 2019 17:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 59CCA2892A for ; Tue, 9 Apr 2019 17:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Bj5lz/EEbRm/WczufXrWeDN9cPf2voOJ1UFxyJqC2Bc=; b=F2htAhvbvXtRpb SXwamPzFgDaTxKqmewPr4S9k1PidOpkpX+3ka0/LH74eEsyGCr04hogMTKdaiLfe2QR2SFN5dLOsZ CRI1wRsGQeNloOkIVTCdQb7UUtccOopzXYPIQrckgDf+suJnyyMl/jEx8/gsFVVeHf1/v0YvYVaRR EbVHyhVEnZkqkq7n0IgUjf8GCYUIV3XIxkGwnbDCni3D2X05RkgKEwJ4ggICAcOKvyiMAPYSeJeKM Jlgz3pVYrLGB1NKnv/BSLO4u14krrKZPZwnMeB2h1kbR8WxCaIbttULmSzUgoJe3Kc+yY8fo6Dl9E zWoAhFTEdEiyBwmDS7Dw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDu8I-00026W-RM; Tue, 09 Apr 2019 17:02:02 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDu8F-00025b-7Z for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2019 17:02:01 +0000 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 5C23F15BE; Tue, 9 Apr 2019 10:01:58 -0700 (PDT) Received: from ostrya.cambridge.arm.com (ostrya.cambridge.arm.com [10.1.196.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EAAA93F68F; Tue, 9 Apr 2019 10:01:55 -0700 (PDT) From: Jean-Philippe Brucker To: will.deacon@arm.com Subject: [PATCH v2 0/7] Add PCI ATS support to Arm SMMUv3 Date: Tue, 9 Apr 2019 17:52:38 +0100 Message-Id: <20190409165245.26500-1-jean-philippe.brucker@arm.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190409_100200_354940_AAB6EBE7 X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, eric.auger@redhat.com, zhongmiao@hisilicon.com, okaya@kernel.org, joro@8bytes.org, rjw@rjwysocki.net, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, hanjun.guo@linaro.org, sudeep.holla@arm.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, lenb@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series enables PCI ATS in SMMUv3. Changes since v1 [1]: * Simplify the SMMU structures (patches 2-4 are new). * Don't enable ATS for devices that are attached to a bypass domain, because in that case a translation request would cause F_BAD_ATS_TREQ. Translation requests in that case cause F_BAD_ATS_TREQ. Enable ATS in attach_dev() rather than add_device(). * Enable ATS for stage-1 and stage-2 STEs alike. There is no benefit to disabling ATS for stage-2 domains. [1] https://www.spinics.net/lists/arm-kernel/msg714628.html Jean-Philippe Brucker (7): ACPI/IORT: Check ATS capability in root complex nodes iommu/arm-smmu-v3: Rename arm_smmu_master_data to arm_smmu_master iommu/arm-smmu-v3: Store SteamIDs in master iommu/arm-smmu-v3: Add a master->domain pointer iommu/arm-smmu-v3: Link domains and devices iommu/arm-smmu-v3: Add support for PCI ATS iommu/arm-smmu-v3: Disable tagged pointers drivers/acpi/arm64/iort.c | 11 ++ drivers/iommu/arm-smmu-v3.c | 340 ++++++++++++++++++++++++++++-------- include/linux/iommu.h | 4 + 3 files changed, 286 insertions(+), 69 deletions(-)