From patchwork Thu Dec 10 16:56:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Singh X-Patchwork-Id: 11965627 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham 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 953AEC433FE for ; Thu, 10 Dec 2020 16:57:59 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 3B6A22067B for ; Thu, 10 Dec 2020 16:57:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B6A22067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.49554.87643 (Exim 4.92) (envelope-from ) id 1knPG4-0005kI-Op; Thu, 10 Dec 2020 16:57:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 49554.87643; Thu, 10 Dec 2020 16:57:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knPG4-0005kB-Ku; Thu, 10 Dec 2020 16:57:36 +0000 Received: by outflank-mailman (input) for mailman id 49554; Thu, 10 Dec 2020 16:57:34 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knPG2-0005k6-FB for xen-devel@lists.xenproject.org; Thu, 10 Dec 2020 16:57:34 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 99e105ad-f3fa-46c1-9e26-d6f7d887b8f1; Thu, 10 Dec 2020 16:57:32 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9956930E; Thu, 10 Dec 2020 08:57:32 -0800 (PST) Received: from scm-wfh-server-rahsin01.stack04.eu02.mi.arm.com (unknown [10.58.246.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14FBC3F66B; Thu, 10 Dec 2020 08:57:30 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 99e105ad-f3fa-46c1-9e26-d6f7d887b8f1 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Wei Liu , Paul Durrant Subject: [PATCH v3 0/8] xen/arm: Add support for SMMUv3 driver Date: Thu, 10 Dec 2020 16:56:58 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 This patch series is v3 of the work to add support for the SMMUv3 driver. Approach taken is to first merge the Linux copy of the SMMUv3 driver (tag v5.8.18) and then modify the driver to build on XEN. MSI and PCI ATS functionality are not supported. Code is not tested and compiled. Code is guarded by the flag CONFIG_PCI_ATS and CONFIG_MSI to compile the driver. Code specific to Linux is removed from the driver to avoid dead code. Driver is currently supported as tech preview. Following functionality should be supported before driver is out for tech preview 1. Investigate the timing analysis of using spin lock in place of mutex when attaching a device to SMMU. 2. Merged the latest Linux SMMUv3 driver code once atomic operation is available in XEN. 3. PCI ATS and MSI interrupts should be supported. 4. Investigate side-effect of using tasklet in place of threaded IRQ and fix if any. 5. fallthorugh keyword should be supported. 6. Implement the ffsll function in bitops.h file. Rahul Singh (8): xen/arm: Import the SMMUv3 driver from Linux xen/arm: revert atomic operation related command-queue insertion patch xen/arm: revert patch related to XArray xen/arm: Remove support for Stage-1 translation on SMMUv3. xen/device-tree: Add dt_property_match_string helper xen/arm: Remove Linux specific code that is not usable in XEN xen/arm: Add support for SMMUv3 driver xen/arm: smmuv3: Remove linux compatibility functions. MAINTAINERS | 6 + SUPPORT.md | 1 + xen/common/device_tree.c | 27 + xen/drivers/passthrough/Kconfig | 11 + xen/drivers/passthrough/arm/Makefile | 1 + xen/drivers/passthrough/arm/smmu-v3.c | 3316 +++++++++++++++++++++++++ xen/include/xen/device_tree.h | 12 + 7 files changed, 3374 insertions(+) create mode 100644 xen/drivers/passthrough/arm/smmu-v3.c