From patchwork Tue Jan 2 09:27:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Jaggi X-Patchwork-Id: 123096 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8754947qgn; Tue, 2 Jan 2018 01:31:01 -0800 (PST) X-Google-Smtp-Source: ACJfBouMlAdxlFlbAI9Wl7CHqRnBRDscR88j1zPIQd9e+Y1d8RQZRvDifINdYMF4YUQPKyDIMHBY X-Received: by 10.107.167.72 with SMTP id q69mr3563155ioe.47.1514885461165; Tue, 02 Jan 2018 01:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514885461; cv=none; d=google.com; s=arc-20160816; b=DoT/rI3s6OhFXWa+HEzYV4miZkr5sce7q46r+5JMthV7pYS0j11HGTQCjdQ7cVY6XO zYDzvUwfspormGiLheksNp8zW3olka120futDm0qD/CoC3EzwAr3iPZHS5AzoETN14zT QkS/gq35tUwBYO2fYn4FI6QwbPqwMPesdsXqU0lEbCnMks0qb4mgGW9wiA/J/M2lH0iO FJOL4YxlZvoUYQtcR+ZjlNfR50qtgd6X5nHNBPTvzSapeQyMWVFACIg1GVtiZQyLBoZa 0ZHPTosm0CsB0eYLAtINy0yV0dGVVCQ4ZywMUxZJylsuCb1BfZiGIWLYk849hGxaVDnV YnQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=WPSvqUHXUAxSkXM7EBbMl0RkguGY/YotZ3CjASGPmuo=; b=xz3ecQhyJgODDsEI1Q6yAmOF3AbUtbvS9QBn3EsTOHG9R3QqKeDeVGVNSp6a/a5uRs 4B1dSqXGPFTUY2X9JxenM0w4O769IjfKP6/dKV3qcOycyAx0ffJshWU2LrWvGpRScVLA inllK1SnguYxVJqreYbldrFdiuESVy3JdyoVzFj66DJNClIGKjQAU7n8bAosgGFg4LRU oRn36KHQalZFl/iPECH69qTSM8GkAy9kJ62TcVZo1YVp8onMf15CM3TgC/LrAFSQXGM0 4JWEXg4lhbRdVPO3e5MfaYCAsLeN2P9DVDJ8iqONVXFny28suvyP+DsfIO5bDi2Xu2Mg ocpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SpthSmBQ; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id z3si24012706ite.166.2018.01.02.01.31.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 01:31:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SpthSmBQ; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWIs2-0002PR-V9; Tue, 02 Jan 2018 09:28:30 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWIs1-0002PL-Ca for xen-devel@lists.xenproject.org; Tue, 02 Jan 2018 09:28:29 +0000 X-Inumbo-ID: 2238079b-ef9f-11e7-b4a6-bc764e045a96 Received: from mail-pf0-x244.google.com (unknown [2607:f8b0:400e:c00::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2238079b-ef9f-11e7-b4a6-bc764e045a96; Tue, 02 Jan 2018 10:27:21 +0100 (CET) Received: by mail-pf0-x244.google.com with SMTP id y89so25473650pfk.0 for ; Tue, 02 Jan 2018 01:28:27 -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; bh=oS5OFgTT39rSYHO9J5r2nTtgOF0SVvkPutlRNfYSgts=; b=SpthSmBQwlHXbkC4DMBpa4BmEBbwKY5A2hSqCoHc7r6KK+kFj6b/FNpYaaQZxTS9OI s75wo0AFRXe/7OCNQqclfc1dZUwbt/o65Udwq8WO2HGunrLzucOJ/9Wr23C13DnwsK2A 66YNJmSq3/0U/cAm9b3Wpx1wV7uuMo08NmqUA= 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; bh=oS5OFgTT39rSYHO9J5r2nTtgOF0SVvkPutlRNfYSgts=; b=jbQpND2eRF9nUw1VrvtqfazjGJCFaDAAqeA7HTTIsTQvQYj9VtnOBGRu9jZzv+N1xc R+l7TfWJDWQoTHBen9zS96QdZgUbK36boUWQt0NK8WaohawSLZCjVWlli2RNcccuWUlA RKN/2kKtNKkCTe6hBz34uyaHA46CIqr17iKdHjzkZYZudKDkCfdhSOkBYuup4aEn6/73 HSOSnlfCyyFes5nFwX/JiNzDICh1UXqn9wBYYubyoYulRCf8UNfh5oJrNnYiHaeF5rJE Qr9OaHLKrqw706CpLf8BOBCH7qohGqb2ERMlyACy3aAr+34S0uU6raHVOSJ9NS6thikb ULKw== X-Gm-Message-State: AKGB3mIlnHclG94JHLlGAKbDOpUhIG1fgmD5vCq+UKfHjsDHikG2+ddI Kq8zl7dQ1jRaUU8OCrlUpUfuqzOoCs0= X-Received: by 10.99.126.18 with SMTP id z18mr37060446pgc.192.1514885306572; Tue, 02 Jan 2018 01:28:26 -0800 (PST) Received: from thunder-dev-box.domain.name ([111.93.218.67]) by smtp.gmail.com with ESMTPSA id e8sm22065207pgs.44.2018.01.02.01.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 01:28:25 -0800 (PST) From: manish.jaggi@linaro.org To: xen-devel@lists.xenproject.org, julien.grall@linaro.org, sameer.goel@linaro.org, andre.przywara@linaro.org Date: Tue, 2 Jan 2018 14:57:58 +0530 Message-Id: <20180102092809.1841-1-manish.jaggi@linaro.org> X-Mailer: git-send-email 2.14.1 Cc: Manish Jaggi , manish.jaggi@cavium.com Subject: [Xen-devel] [RFC 00/11] acpi: arm: IORT Support for Xen X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Manish Jaggi This patch aims to add the support of IORT in Xen. Below is the list of major components which this patchset provides. a. Add support for parsing the IORT b. Provides API to populate/query requesterid - streamID mappings and reuqesterid - deviceid mappings c. The requesterid - deviceid mappings is used to create the IORT for hardware domain (which hides smmu nodes from IORT) d. iort.c fwnode.h fwspec code is imported from linux and modified. e. Few kernel helper routines are also imported from linux. This patchset compiles with [1] [RFC v4 0/8] SMMUv3 driver. [1] https://lists.xen.org/archives/html/xen-devel/2017-12/msg01294.html Manish Jaggi (11): acpi: arm: Public API for populating and query based on requesterid acpi: arm: API to query estimated size of hardware domain's IORT acpi: arm: Code to generate Hardware Domains IORT acpi: arm: Import iort.c and acpi_iort.h acpi: arm: Import fwnode.h from linux acpi: arm: fwnode xen spacific changes Add kernel helper functions Add ACPI_IORT config acpi: arm: Xen IORT Changes acpi: arm: IORT parsing functions to prepare requesterId maps Add to_pci_dev macro xen/arch/arm/Kconfig | 5 + xen/arch/arm/domain_build.c | 40 ++- xen/arch/arm/setup.c | 2 + xen/drivers/acpi/Kconfig | 3 + xen/drivers/acpi/Makefile | 1 + xen/drivers/acpi/arm/Makefile | 3 + xen/drivers/acpi/arm/gen-iort.c | 352 +++++++++++++++++++++++++ xen/drivers/acpi/arm/iort.c | 569 ++++++++++++++++++++++++++++++++++++++++ xen/drivers/acpi/arm/ridmap.c | 124 +++++++++ xen/drivers/passthrough/iommu.c | 75 ++++++ xen/include/acpi/acpi_iort.h | 57 ++++ xen/include/acpi/gen-iort.h | 7 + xen/include/acpi/ridmap.h | 77 ++++++ xen/include/asm-arm/acpi.h | 1 + xen/include/asm-arm/device.h | 11 +- xen/include/xen/fwnode.h | 125 +++++++++ xen/include/xen/iommu.h | 22 ++ xen/include/xen/kernel.h | 10 + xen/include/xen/pci.h | 3 + 19 files changed, 1484 insertions(+), 3 deletions(-) create mode 100644 xen/drivers/acpi/arm/Makefile create mode 100644 xen/drivers/acpi/arm/gen-iort.c create mode 100644 xen/drivers/acpi/arm/iort.c create mode 100644 xen/drivers/acpi/arm/ridmap.c create mode 100644 xen/include/acpi/acpi_iort.h create mode 100644 xen/include/acpi/gen-iort.h create mode 100644 xen/include/acpi/ridmap.h create mode 100644 xen/include/xen/fwnode.h