From: Julien Grall Subject: [PATCH v2 00/15] IOMMU support for ARM Date: Sun, 23 Feb 2014 22:16:17 +0000 Message-ID: <1393193792-20008-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHhLi-0006oJ-TX for xen-devel@lists.xenproject.org; Sun, 23 Feb 2014 22:16:39 +0000 Received: by mail-ee0-f51.google.com with SMTP id b57so2770704eek.24 for ; Sun, 23 Feb 2014 14:16:36 -0800 (PST) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Hello, This is the second version of the patch series to add support for IOMMU on ARM. It also add ARM SMMU driver which is used for instance on Midway. The IOMMU architecture for ARM is relying on the page table is shared between the processor and each IOMMU. The patch series is divided following: - #1: fixing grant-table with IOMMU. Will be necessary for ARM later - #2-#3: Make static some vtd functions - #4-#5: Adding new device tree functions - #6-#9: Prepare IOMMU code to add support for ARM - #10: Adding basic device tree assignment support - #11-#15: Add IOMMU architecture for ARM - #15: Add SMMU drivers For now the 1:1 workaround is not removed because a same platform can have DMA-capable device which are under an IOMMU and some not. Major changes for the RFC: - Adding basic device tree assignment support - Draft a binding to notify DOM0 which device is protected - Couple of fixes when the IOMMU is disabled or there is no IOMMU support for the board. This series has also dependency on: - early printk series : http://lists.xen.org/archives/html/xen-devel/2014-01/msg00288.html - interrupt series: http://lists.xen.org/archives/html/xen-devel/2014-01/msg02139.html - few bug fixes on the previous series A working tree can be found here: git://xenbits.xen.org/people/julieng/xen-unstable.git branch smmu-v2 Any comments, questions are welcomed. Sincerely yours, Julien Grall (15): xen/common: grant-table: only call IOMMU if paging mode translate is disabled xen/passthrough: vtd: Don't export iommu_domain_teardown xen/passthrough: vtd: Don't export iommu_set_pgd xen/dts: Add dt_property_read_bool xen/dts: Add dt_parse_phandle_with_args and dt_parse_phandle xen/passthrough: rework dom0_pvh_reqs to use it also on ARM xen/passthrough: iommu: Don't need to map dom0 page when the PT is shared xen/passthrough: iommu: Split generic IOMMU code xen/passthrough: iommu: Introduce arch specific code xen/passthrough: iommu: Basic support of device tree assignment xen/passthrough: Introduce IOMMU ARM architecture MAINTAINERS: Add drivers/passthrough/arm xen/arm: Don't give IOMMU devices to dom0 when iommu is disabled xen/arm: Add the property "protected-devices" in the hypervisor node drivers/passthrough: arm: Add support for SMMU drivers MAINTAINERS | 1 + xen/arch/arm/Rules.mk | 1 + xen/arch/arm/device.c | 15 + xen/arch/arm/domain.c | 7 + xen/arch/arm/domain_build.c | 78 +- xen/arch/arm/kernel.h | 3 + xen/arch/arm/p2m.c | 4 + xen/arch/arm/setup.c | 2 + xen/arch/x86/domctl.c | 6 +- xen/arch/x86/hvm/io.c | 2 +- xen/arch/x86/tboot.c | 3 +- xen/common/device_tree.c | 161 ++- xen/common/grant_table.c | 7 +- xen/drivers/passthrough/Makefile | 6 +- xen/drivers/passthrough/amd/iommu_cmd.c | 2 +- xen/drivers/passthrough/amd/iommu_guest.c | 8 +- xen/drivers/passthrough/amd/iommu_map.c | 56 +- xen/drivers/passthrough/amd/pci_amd_iommu.c | 53 +- xen/drivers/passthrough/arm/Makefile | 2 + xen/drivers/passthrough/arm/iommu.c | 65 + xen/drivers/passthrough/arm/smmu.c | 1736 +++++++++++++++++++++++++++ xen/drivers/passthrough/device_tree.c | 106 ++ xen/drivers/passthrough/iommu.c | 542 +-------- xen/drivers/passthrough/pci.c | 437 +++++++ xen/drivers/passthrough/vtd/iommu.c | 84 +- xen/drivers/passthrough/x86/Makefile | 1 + xen/drivers/passthrough/x86/iommu.c | 106 ++ xen/include/asm-arm/device.h | 13 +- xen/include/asm-arm/domain.h | 2 + xen/include/asm-arm/hvm/iommu.h | 10 + xen/include/asm-arm/iommu.h | 36 + xen/include/asm-x86/hvm/iommu.h | 29 + xen/include/asm-x86/iommu.h | 50 + xen/include/xen/device_tree.h | 89 ++ xen/include/xen/hvm/iommu.h | 33 +- xen/include/xen/iommu.h | 71 +- 36 files changed, 3148 insertions(+), 679 deletions(-) create mode 100644 xen/drivers/passthrough/arm/Makefile create mode 100644 xen/drivers/passthrough/arm/iommu.c create mode 100644 xen/drivers/passthrough/arm/smmu.c create mode 100644 xen/drivers/passthrough/device_tree.c create mode 100644 xen/drivers/passthrough/x86/iommu.c create mode 100644 xen/include/asm-arm/hvm/iommu.h create mode 100644 xen/include/asm-arm/iommu.h create mode 100644 xen/include/asm-x86/iommu.h -- 1.7.10.4