From patchwork Fri Feb 9 03:10:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Goel X-Patchwork-Id: 127748 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp209254ljc; Thu, 8 Feb 2018 19:13:29 -0800 (PST) X-Google-Smtp-Source: AH8x226jh2Anw73BysG3kSDj2d+1tOyW9qoRUxX6bfdSGveEGEiOUnPXLN0mEe5BRVobu8aQnTtF X-Received: by 10.36.66.143 with SMTP id i137mr1805415itb.30.1518146009680; Thu, 08 Feb 2018 19:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518146009; cv=none; d=google.com; s=arc-20160816; b=d4X14nq7D8ls6V2W6lPlSQSCpTuJr8YzGh41+nFkEAurVxx8cStCLd4d8MwYcZ3IcA Rz6KC/HzXrbd4BFrP2qqFw4hCUuB6+EoKGbhXWRYm67+ZKtOOmoEr/UUr4fEyeuYZoXX LAqgB2FhvjzN1QwRc6qDfk62/gLk8hEkt+NtviiCPaFK0NBjcF/nbHWdrh+d/TN63Tkv X2lHN98IWhKGopP0GG8vy+I/lhORgSCJ8zhRx5j8yZWNw/67MHg/jeXrqbtpfrr4JDQG FFatIOTRPXgltoA7qNn43JM3vaV3jPlWnZZ8k92qIg7OY3ZdUHT4apTtUMhTi+3zgqCz Bakw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-unsubscribe:list-id:precedence:subject:cc :mime-version:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=5P9d37zOF+OJUiXSLN4b3RnjNCtO/l24zpUaE0PTH8w=; b=ZhkSEppSTcozbiZxgsh11P/11WYqsqHITo/JMpCt73dDfgVTXWbzdI5yZ8FM/axGuS WNKf/5zQW0HeYKgCwtyaKrPSgeC+tEFEj0CxslNnI/DxUall3t87gqWq1xQ01rhNiYy0 +hOliqFHYQBjEHs/0v9/IqcJhxznC1WDJar7evnEAsbqUg6CoYeH9c7K5exZcS9x6pY0 q83Vvudqwduybq4wVS+/RHXqdtDisXL36lyP2h0T2omstIm5qrgJOnZCYexNfrwwCaC5 RFFfBpoqvlRzXrqLUu3TkkyoseRATwgMQ4/3e5fczdD1CJ4EMqUkA5T1x8I8xP6d1mV/ 8UYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CV1PYdn1; 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 u7si662670iou.194.2018.02.08.19.13.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 19:13:29 -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=CV1PYdn1; 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 1ejz5g-0004xG-Fe; Fri, 09 Feb 2018 03:11:08 +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 1ejz5f-0004xA-1a for xen-devel@lists.xenproject.org; Fri, 09 Feb 2018 03:11:07 +0000 X-Inumbo-ID: cd0d22d8-0d46-11e8-ba59-bc764e045a96 Received: from mail-pg0-x241.google.com (unknown [2607:f8b0:400e:c05::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id cd0d22d8-0d46-11e8-ba59-bc764e045a96; Fri, 09 Feb 2018 04:10:37 +0100 (CET) Received: by mail-pg0-x241.google.com with SMTP id m136so2740156pga.12 for ; Thu, 08 Feb 2018 19:11:05 -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=kEFnqbF701l+jFz2OLaC+wv7TyX7SRQcuravKY5nx7A=; b=CV1PYdn1b3HnOjC0UPWOcjQy0Bc8GFrBv+RmF+3VlGl2G+x3Hp5Az+INXr0fhjIJkM 4xZ7WvHRcihDI3kjGX/GcggwBxvfJdtXctdqfx2fZKhYVEYJEV7EZvUQE1dtp4fg1TXR AC2rqAjR3r2+u7AXeXYhibE+6pZoY6RQaTNcQ= 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=kEFnqbF701l+jFz2OLaC+wv7TyX7SRQcuravKY5nx7A=; b=L5L1X02rvQP1qVFbWvsNXbLZn75p0iJcaHVNySJ6VqyJwR/1hSTAuwnlIRsIIh4LDO fwXIfal+8yk+njNgANInDCYVnZkYJQ1DWW1xLbDclvYtxhT2gCOBNZvNGbp6MwzPgKVo xgvZP8NfMx9KxCq5qaUvMMg5OInURY4K+DIofZ9aCRh2X8u+h44xf+NY+8gvS8l5tGCP ofxLK1xKVFTEKzS9yq7E3q0T5dfHQ4K3qYY0Ei8TdC2+gJkJwQcKe+Umbn9u2fpAxnaZ 46PMS48e1iu8US18tRoBukrE2LRX4Aqy9cRifLCOwxxT353u+N6SXt80fRXgBZD04czs aEUg== X-Gm-Message-State: APf1xPA+OvCrkmC869J+PNEBChqYpsgsKo07M2mmJzaipsePpvQlpQ6m XPm+VKeEaon+l8t7rd7ZLxm6vlBZviM= X-Received: by 10.101.74.132 with SMTP id b4mr1136383pgu.355.1518145864198; Thu, 08 Feb 2018 19:11:04 -0800 (PST) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id z15sm2663487pgr.62.2018.02.08.19.11.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 19:11:03 -0800 (PST) From: Sameer Goel To: xen-devel@lists.xenproject.org, julien.grall@arm.com, mjaggi@caviumnetworks.com Date: Thu, 8 Feb 2018 20:10:48 -0700 Message-Id: <20180209031055.21926-1-sameer.goel@linaro.org> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Cc: sstabellini@kernel.org, shankerd@codeaurora.org, Sameer Goel Subject: [Xen-devel] [PATCH 0/7] SMMUv3 driver 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: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This patch set adds support for the SMMUv3 driver. This is a continuation on a RFCv4.[1] The IORT support came from [2]. This RFC has some conflicting defines that have to be addressed by introducing the linux_compat.h header in IORT patch set. In any case the SMMU changes apply on top of IORT patches. List of changes: - Addition of a linux_compat header. - Addition of a common header for arm smmu defines. - Rebase of the SMMUv3 driver to the driver in linux kernel 4.14 rc7. - New config defines for ARM SMMU drivers. [1] https://lists.xenproject.org/archives/html/xen-devel/2017-12/msg01294.html [2] https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg00007.html Sameer Goel (7): Port WARN_ON_ONCE() from Linux xen/bitops: Rename LOG_2 to ilog2 passthrough/arm: Modify SMMU driver to use generic device definition Add verbatim copy of arm-smmu-v3.c from Linux xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver drivers/passthrough/arm: Refactor code for arm smmu drivers xen/smmu: Add a new config define for legacy SMMU xen/arch/arm/p2m.c | 1 + xen/arch/arm/xen.lds.S | 1 + xen/arch/x86/x86_64/asm-offsets.c | 2 +- xen/arch/x86/xen.lds.S | 1 + xen/drivers/Kconfig | 2 + xen/drivers/passthrough/arm/Kconfig | 14 + xen/drivers/passthrough/arm/Makefile | 3 +- xen/drivers/passthrough/arm/arm_smmu.h | 125 ++ xen/drivers/passthrough/arm/smmu-v3.c | 3625 ++++++++++++++++++++++++++++++++ xen/drivers/passthrough/arm/smmu.c | 114 +- xen/include/xen/bitops.h | 2 +- xen/include/xen/lib.h | 13 + xen/include/xen/linux_compat.h | 84 + 13 files changed, 3877 insertions(+), 110 deletions(-) create mode 100644 xen/drivers/passthrough/arm/Kconfig create mode 100644 xen/drivers/passthrough/arm/arm_smmu.h create mode 100644 xen/drivers/passthrough/arm/smmu-v3.c create mode 100644 xen/include/xen/linux_compat.h