From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB58AC04E30 for ; Mon, 9 Dec 2019 18:11:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B209B24655 for ; Mon, 9 Dec 2019 18:11:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eChG24Hv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbfLISL6 (ORCPT ); Mon, 9 Dec 2019 13:11:58 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38688 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbfLISL6 (ORCPT ); Mon, 9 Dec 2019 13:11:58 -0500 Received: by mail-wr1-f67.google.com with SMTP id y17so17286008wrh.5 for ; Mon, 09 Dec 2019 10:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=eChG24HveCLJr1w7htcnEaSdvHwWYy3dopCe7PzKjFIohfKepun/JzeHDOVtJdhFBX krj9dCfZna5uDRah00TO6hMrC5CxJ839KjvhzTUWqxzJ0nzCKaHhF508qHSSy0GZtoSx KJKhRNuYym1oZf7HWKmhQjbPY2WwKkqcLV/aEZnMdOGhN7+MIwQiCiCZ6KKFGROEzZxL Htj1QWdRJqh6WeQx5GUmgHJil8TmhNhDhDAyvl7+sHEzB6M95GtfmZ/PLcNOaeZEdyGj IBWYXgi+wPjUJZNb7Xjum2/nBvekCA934r8JznZDGI55yX51UEARM1sRTsF7H8bRaJoC 7XyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=L2wKYt9o2pCKDDc5XZc0niJbrdU1P7qVOpxqrIP3gp14nLeToVVkalPUksuhCuEke+ 9kQ9ynRNzdUyXTp6zgyXxWb95j4Y/yOg71y7jWOLd8n8AwHcKnNFL3nOLDYj+lfQE96u T0tmh0J6ri9VoRegFuR8tVXKqdFmqW8H/qaw3Sk+xM5VtlA3CEMvuCUHXjLe9BL21NAj 2zF4g0sKkgO2Eo4Pz9K8ctVIhhvBb+Eho7Y4ZGosBAli/8RdSr3exRUJsZAMtHploJ4r WNV6vCfiq2QyAw3AGxpkSiurAkmNIcXZBb8E9CnkQrKrJU0GArg6/TIRlKWxVMEUt5yt 89yw== X-Gm-Message-State: APjAAAUhVOsPROA9tkzdFw8eDUGU1lJVur4hCOwpvgjkFLDcIjAXfz2c OmgMbPigv3/9045RbYAW0isbfQ== X-Google-Smtp-Source: APXvYqzT1ymN3phudM5XMKZ/AIHs5aojcXL1B8J2G48oy5R7vLLmgXJx0GUEWH2l1syk1oV2bTStlA== X-Received: by 2002:a5d:5704:: with SMTP id a4mr3593884wrv.198.1575915116081; Mon, 09 Dec 2019 10:11:56 -0800 (PST) Received: from localhost.localdomain (adsl-62-167-101-88.adslplus.ch. [62.167.101.88]) by smtp.gmail.com with ESMTPSA id h2sm309838wrv.66.2019.12.09.10.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 10:11:55 -0800 (PST) From: Jean-Philippe Brucker To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org Cc: joro@8bytes.org, robh+dt@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org, will@kernel.org, robin.murphy@arm.com, bhelgaas@google.com, eric.auger@redhat.com, jonathan.cameron@huawei.com, zhangfei.gao@linaro.org Subject: [PATCH v3 00/13] iommu: Add PASID support to Arm SMMUv3 Date: Mon, 9 Dec 2019 19:05:01 +0100 Message-Id: <20191209180514.272727-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Add support for Substream ID and PASIDs to the SMMUv3 driver. Changes since v2 [1]: * Split preparatory work into patches 5, 6, 8 and 9. * Added patch 1. Not strictly relevant, but since we're moving the DMA allocations and adding a new one, we might as well clean the flags first. * Fixed a double free reported by Jonathan, and other small issues. * Added patch 12. Upstream commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") removed the unused PASID stubs. Since the SMMU driver can be built without PCI, the stubs are now needed. [1] https://lore.kernel.org/linux-iommu/20191108152508.4039168-1-jean-philippe@linaro.org/ Jean-Philippe Brucker (13): iommu/arm-smmu-v3: Drop __GFP_ZERO flag from DMA allocation dt-bindings: document PASID property for IOMMU masters iommu/arm-smmu-v3: Support platform SSID ACPI/IORT: Support PASID for platform devices iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support iommu/arm-smmu-v3: Add context descriptor tables allocators iommu/arm-smmu-v3: Add support for Substream IDs iommu/arm-smmu-v3: Propate ssid_bits iommu/arm-smmu-v3: Handle failure of arm_smmu_write_ctx_desc() iommu/arm-smmu-v3: Add second level of context descriptor table iommu/arm-smmu-v3: Improve add_device() error handling PCI/ATS: Add PASID stubs iommu/arm-smmu-v3: Add support for PCI PASID .../devicetree/bindings/iommu/iommu.txt | 6 + drivers/acpi/arm64/iort.c | 18 + drivers/iommu/arm-smmu-v3.c | 462 +++++++++++++++--- drivers/iommu/of_iommu.c | 6 +- include/linux/iommu.h | 2 + include/linux/pci-ats.h | 3 + 6 files changed, 437 insertions(+), 60 deletions(-) -- 2.24.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D3BBC00454 for ; Mon, 9 Dec 2019 18:12:02 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1545021556 for ; Mon, 9 Dec 2019 18:12:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eChG24Hv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1545021556 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8F0DF877D0; Mon, 9 Dec 2019 18:12:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EPzO9WsDB90Q; Mon, 9 Dec 2019 18:12:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 41B2F877A7; Mon, 9 Dec 2019 18:12:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2AB1FC1D7F; Mon, 9 Dec 2019 18:12:00 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id B32C4C0881 for ; Mon, 9 Dec 2019 18:11:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AEB6187C41 for ; Mon, 9 Dec 2019 18:11:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1zcVrxg6ANIU for ; Mon, 9 Dec 2019 18:11:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id B387887C20 for ; Mon, 9 Dec 2019 18:11:57 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z7so17177197wrl.13 for ; Mon, 09 Dec 2019 10:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=eChG24HveCLJr1w7htcnEaSdvHwWYy3dopCe7PzKjFIohfKepun/JzeHDOVtJdhFBX krj9dCfZna5uDRah00TO6hMrC5CxJ839KjvhzTUWqxzJ0nzCKaHhF508qHSSy0GZtoSx KJKhRNuYym1oZf7HWKmhQjbPY2WwKkqcLV/aEZnMdOGhN7+MIwQiCiCZ6KKFGROEzZxL Htj1QWdRJqh6WeQx5GUmgHJil8TmhNhDhDAyvl7+sHEzB6M95GtfmZ/PLcNOaeZEdyGj IBWYXgi+wPjUJZNb7Xjum2/nBvekCA934r8JznZDGI55yX51UEARM1sRTsF7H8bRaJoC 7XyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=gCoTWXUx5fkmDmsrw0mZHRZcmX5RYPq9z0Nrfg9IQiUdwlf1fAXdoIdjgq5iLj/Aen stoMknkn1pyh/rFDjHR55Yh3i7XOhUzTDw1fdPltOx1JG2YvBs3d2QEkSP/m2gUPY1uL Oy/c5GtOUn1uW34r3laA24Ew4ygofXcS7Zc8l/UflQO4P6734ZcIawQtH7z82/cQOlwx yx6adMmJnzSd49jK4z/958G+nwD9+4pBHqSrEKlmD3LuC/fRWqOBvVNVZ1lTlPGYD0I5 tqYF5f/RMtuJE18au9rdKoCXIRwXHsBO7d2VaJHFYIHQY9bE6U11snZrqqBJ39dJ+PoA eG9w== X-Gm-Message-State: APjAAAWP4Qxdn9QqNTN5gESXOdDf7jY4sTW4oxOusghDaltmO1RrVYpY FTB28LhygD3H9hFJdaZ/4+igEw== X-Google-Smtp-Source: APXvYqzT1ymN3phudM5XMKZ/AIHs5aojcXL1B8J2G48oy5R7vLLmgXJx0GUEWH2l1syk1oV2bTStlA== X-Received: by 2002:a5d:5704:: with SMTP id a4mr3593884wrv.198.1575915116081; Mon, 09 Dec 2019 10:11:56 -0800 (PST) Received: from localhost.localdomain (adsl-62-167-101-88.adslplus.ch. [62.167.101.88]) by smtp.gmail.com with ESMTPSA id h2sm309838wrv.66.2019.12.09.10.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 10:11:55 -0800 (PST) From: Jean-Philippe Brucker To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v3 00/13] iommu: Add PASID support to Arm SMMUv3 Date: Mon, 9 Dec 2019 19:05:01 +0100 Message-Id: <20191209180514.272727-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Cc: mark.rutland@arm.com, robin.murphy@arm.com, guohanjun@huawei.com, rjw@rjwysocki.net, robh+dt@kernel.org, sudeep.holla@arm.com, bhelgaas@google.com, zhangfei.gao@linaro.org, will@kernel.org, lenb@kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Add support for Substream ID and PASIDs to the SMMUv3 driver. Changes since v2 [1]: * Split preparatory work into patches 5, 6, 8 and 9. * Added patch 1. Not strictly relevant, but since we're moving the DMA allocations and adding a new one, we might as well clean the flags first. * Fixed a double free reported by Jonathan, and other small issues. * Added patch 12. Upstream commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") removed the unused PASID stubs. Since the SMMU driver can be built without PCI, the stubs are now needed. [1] https://lore.kernel.org/linux-iommu/20191108152508.4039168-1-jean-philippe@linaro.org/ Jean-Philippe Brucker (13): iommu/arm-smmu-v3: Drop __GFP_ZERO flag from DMA allocation dt-bindings: document PASID property for IOMMU masters iommu/arm-smmu-v3: Support platform SSID ACPI/IORT: Support PASID for platform devices iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support iommu/arm-smmu-v3: Add context descriptor tables allocators iommu/arm-smmu-v3: Add support for Substream IDs iommu/arm-smmu-v3: Propate ssid_bits iommu/arm-smmu-v3: Handle failure of arm_smmu_write_ctx_desc() iommu/arm-smmu-v3: Add second level of context descriptor table iommu/arm-smmu-v3: Improve add_device() error handling PCI/ATS: Add PASID stubs iommu/arm-smmu-v3: Add support for PCI PASID .../devicetree/bindings/iommu/iommu.txt | 6 + drivers/acpi/arm64/iort.c | 18 + drivers/iommu/arm-smmu-v3.c | 462 +++++++++++++++--- drivers/iommu/of_iommu.c | 6 +- include/linux/iommu.h | 2 + include/linux/pci-ats.h | 3 + 6 files changed, 437 insertions(+), 60 deletions(-) -- 2.24.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B869C2D0D1 for ; Mon, 9 Dec 2019 18:12:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16DF921556 for ; Mon, 9 Dec 2019 18:12:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z8Y5uf73"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eChG24Hv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16DF921556 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=ehYRzJiGYG3mpGwng2+ZtOpo8xxaNGm9ZtzcU/3sOXY=; b=Z8Y5uf73kvKlug IKMYPXVlGqruFt1L37+SDACbtruIvfllOcp18t0pcQfqVS4Xr2T/4C0Attvz8rcFb1qy9X33PIYn8 on2TVLswGDVbFmmaCQgOul7y8go9CMAxjbcP3L5LidwjqdSBk4ev6LlD66CUiv6FSHJ3/P+uRIKn0 8d0jxrj99n16sjmoj//Yds+nQHY1/yWYg/sllfmKWYcJaOsFhK3lP1NZet4D8qKstPpJuguZBvA2A cAxlD6t3SVaNs6Ldx1kHVn7FgdhqTcZUEsil/yTvVUhRIpd1DJIqztwjPKOdCvbw0R39HvtQNH1m1 8b+e/8nQxR4dw2Y2PCLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieNVp-0004c4-UO; Mon, 09 Dec 2019 18:12:01 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieNVl-0004bC-O4 for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2019 18:11:59 +0000 Received: by mail-wr1-x443.google.com with SMTP id z3so17304699wru.3 for ; Mon, 09 Dec 2019 10:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=eChG24HveCLJr1w7htcnEaSdvHwWYy3dopCe7PzKjFIohfKepun/JzeHDOVtJdhFBX krj9dCfZna5uDRah00TO6hMrC5CxJ839KjvhzTUWqxzJ0nzCKaHhF508qHSSy0GZtoSx KJKhRNuYym1oZf7HWKmhQjbPY2WwKkqcLV/aEZnMdOGhN7+MIwQiCiCZ6KKFGROEzZxL Htj1QWdRJqh6WeQx5GUmgHJil8TmhNhDhDAyvl7+sHEzB6M95GtfmZ/PLcNOaeZEdyGj IBWYXgi+wPjUJZNb7Xjum2/nBvekCA934r8JznZDGI55yX51UEARM1sRTsF7H8bRaJoC 7XyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPZYuKzuHS01ypbpAypAPWL2i1nnzUw0mtei/SOU8FI=; b=BeRJRB7dXeHD2fPOlR5lTtb6eyvTcpbcW5jEUXL7QePWOiXxdahSL44XloivRLQ8hb u3CDs08lz2pDosvAIzPaKSGtwBwfGkKOg6f+KvU3dYA9SBToyC7G4x9AHd2Iwlg5bVMt dxTqhAXQDBB3CrscPGcEdkoVBo/KdILwEosMjyJNkuZ12IForx8E02PBpFe82ZUcNBUD S2M++HoDvf2sKYqByUKHjpp7b7HRWgz5hYeYkKKmk0JxXXH+c2TNNjXHTvapdwLR7Dnf IYA8ezo6FqGy0cLdAR0pXYrsOlgUIe8jgrrQRpKe3wLWupXPh3qKyi42ZAg7pOtGygIs ExPw== X-Gm-Message-State: APjAAAXjq97yfpdXucYOu/gLQu8GNWpH89lnAONmuf8hHpJ1rI4zCuJm hDec+K5J9+gCUNyu2ow5eHJjLw== X-Google-Smtp-Source: APXvYqzT1ymN3phudM5XMKZ/AIHs5aojcXL1B8J2G48oy5R7vLLmgXJx0GUEWH2l1syk1oV2bTStlA== X-Received: by 2002:a5d:5704:: with SMTP id a4mr3593884wrv.198.1575915116081; Mon, 09 Dec 2019 10:11:56 -0800 (PST) Received: from localhost.localdomain (adsl-62-167-101-88.adslplus.ch. [62.167.101.88]) by smtp.gmail.com with ESMTPSA id h2sm309838wrv.66.2019.12.09.10.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 10:11:55 -0800 (PST) From: Jean-Philippe Brucker To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v3 00/13] iommu: Add PASID support to Arm SMMUv3 Date: Mon, 9 Dec 2019 19:05:01 +0100 Message-Id: <20191209180514.272727-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191209_101157_795554_13B484D4 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, lorenzo.pieralisi@arm.com, robin.murphy@arm.com, joro@8bytes.org, guohanjun@huawei.com, rjw@rjwysocki.net, eric.auger@redhat.com, robh+dt@kernel.org, jonathan.cameron@huawei.com, sudeep.holla@arm.com, bhelgaas@google.com, zhangfei.gao@linaro.org, will@kernel.org, lenb@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for Substream ID and PASIDs to the SMMUv3 driver. Changes since v2 [1]: * Split preparatory work into patches 5, 6, 8 and 9. * Added patch 1. Not strictly relevant, but since we're moving the DMA allocations and adding a new one, we might as well clean the flags first. * Fixed a double free reported by Jonathan, and other small issues. * Added patch 12. Upstream commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") removed the unused PASID stubs. Since the SMMU driver can be built without PCI, the stubs are now needed. [1] https://lore.kernel.org/linux-iommu/20191108152508.4039168-1-jean-philippe@linaro.org/ Jean-Philippe Brucker (13): iommu/arm-smmu-v3: Drop __GFP_ZERO flag from DMA allocation dt-bindings: document PASID property for IOMMU masters iommu/arm-smmu-v3: Support platform SSID ACPI/IORT: Support PASID for platform devices iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support iommu/arm-smmu-v3: Add context descriptor tables allocators iommu/arm-smmu-v3: Add support for Substream IDs iommu/arm-smmu-v3: Propate ssid_bits iommu/arm-smmu-v3: Handle failure of arm_smmu_write_ctx_desc() iommu/arm-smmu-v3: Add second level of context descriptor table iommu/arm-smmu-v3: Improve add_device() error handling PCI/ATS: Add PASID stubs iommu/arm-smmu-v3: Add support for PCI PASID .../devicetree/bindings/iommu/iommu.txt | 6 + drivers/acpi/arm64/iort.c | 18 + drivers/iommu/arm-smmu-v3.c | 462 +++++++++++++++--- drivers/iommu/of_iommu.c | 6 +- include/linux/iommu.h | 2 + include/linux/pci-ats.h | 3 + 6 files changed, 437 insertions(+), 60 deletions(-) -- 2.24.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel