From patchwork Tue Dec 19 03:16:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Goel X-Patchwork-Id: 122333 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3622048qgn; Mon, 18 Dec 2017 19:19:49 -0800 (PST) X-Google-Smtp-Source: ACJfBou07bgRuNkwYSZP5WttA8jy/vMaZR8BTQ1AKAjOhT9O3OeCmzOFJSIPw3frS0Qq5n1kIvYn X-Received: by 10.36.107.69 with SMTP id v66mr1600958itc.10.1513653589118; Mon, 18 Dec 2017 19:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513653589; cv=none; d=google.com; s=arc-20160816; b=pbuCL1FBuG48+H989P6bQokoU1GRiTM78DWjQ3jfv3wlXQwrBci47gqfqYTDgoka9D /mnDMtys6joKAt2XQe7PQ+Wx1Jzmxy9viKnOY3J/wScy2q6DR2e49U/+y+AnOPchPVAh 5BW/E01Fl2NTvVlWKvP+KznCQTU3rpI6RTYBBKyRUU6JiSiAIHCx2gn1TOKjRchMdW+s l6UW/GyPP9YauI++we60TpQZpNm1cCo7lvvt5ez+jEQkEMkrAEdzNZjZMnuAUe0YalZm e8047g+dD/7fwraUoZNXJNbK8L/k2fC9+2oyk2VTqPyu7G2VZOfPKYg4zRPvRrLNHwYo 2ECw== 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=Aj32ayeA2wxIOuXZYi0RmacacwMbanoLVi4iAPj3FlA=; b=IlxvPWnmspta34z099HbnqV8w9pb5tG0398D/Ar8fMJO0WeYigHRDN4OjmBC+6Hwhv D373DexunU6W0bckNx7Oolt27wVo1OG42uZageGZMrZQwhcjtHAAmhOYCKtvRkkn+w2z Tq11eRkooXz4IZVKd4xSP6M2m8ofTfy6lc+5pmMLSfoVUbtcZcsX0nffjLub0XGQiRTu ED9seboXT4WZKXd+oMdzCXVCD8VEWB1UhufqvgzMvNmwRV5KfHl3QpDdizRrBz9hZ4pS ShOJVCBaWObpSONNqoz04HhFRwa6K4mYbUVtrynbY7cP50aVQCDHPTqaXj5D1OY2Utfl JrGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EyRjdTEv; 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 132si666116ito.51.2017.12.18.19.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 19:19:49 -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=EyRjdTEv; 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 1eR8P0-0006Zn-OH; Tue, 19 Dec 2017 03:17:10 +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 1eR8Oz-0006Zh-Ik for xen-devel@lists.xenproject.org; Tue, 19 Dec 2017 03:17:09 +0000 X-Inumbo-ID: feac0163-e46a-11e7-b4a6-bc764e045a96 Received: from mail-pl0-x242.google.com (unknown [2607:f8b0:400e:c01::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id feac0163-e46a-11e7-b4a6-bc764e045a96; Tue, 19 Dec 2017 04:16:25 +0100 (CET) Received: by mail-pl0-x242.google.com with SMTP id s3so6142151plp.4 for ; Mon, 18 Dec 2017 19:17:07 -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=gFON8i7u78tera69hlFsLY2n7WtWY5vydEiS+iFRY98=; b=EyRjdTEvuZX0WuTgFwcSYTLfKygQX4pXK45+cwQQ3DJZi7wKswEXn2txCormGcH5ew tLBrvVcO8UxrnazdUjEij1Siqu5KTK3tPTXfqaycJ49nfN8aqqXhvKifjyRmxxaOnJPe WlHAAfRsTqqGWl2KAVHjon3JWbh30z+XpuIkU= 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=gFON8i7u78tera69hlFsLY2n7WtWY5vydEiS+iFRY98=; b=UbHh/OWemBrU0K34X+N2WjWHwwjKy2wvlLcDp3WJPkdA3yhFj7/c2pQMuRz5VJLmle jfEV8F5ilnZc159SkGb+6F4MEx6bEl3xuXp0MSnWB02qu+QdXiqHZA7yFxehdNxjxH0i Ab/PWM/FyUXTAxwx08RYFMve0mITb2mR59GlEN8ctVyzPA5o/3pNbCE3QHHZCQgfm9HK G5MUUE6Cbr8N/LZfGn+7ii4AdIRTZfecSr8lf5HQIhACqmd3oslqdjbt7OZDzOmryGiP FLktEAG/hZ+elxUZp45ULKsx1VA7okqeQ21bYT4zN0pAbKQCLYEdFXfp41JlV+e1rA9B YXdw== X-Gm-Message-State: AKGB3mJtC4mG1j2D2F6BqOG1+zheyZDA+Pn+mmo5Vnbx6YmWvdOlE2k8 JwI6oaFD26ErdqzpD+9LZ8XQ710sJorGbA== X-Received: by 10.84.254.2 with SMTP id b2mr1745493plm.407.1513653426562; Mon, 18 Dec 2017 19:17:06 -0800 (PST) Received: from sameer-ubuntu-book.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 84sm28289917pfp.180.2017.12.18.19.17.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 19:17:06 -0800 (PST) From: Sameer Goel To: xen-devel@lists.xenproject.org, julien.grall@arm.com, mjaggi@caviumnetworks.com Date: Mon, 18 Dec 2017 20:16:55 -0700 Message-Id: <20171219031703.23420-1-sameer.goel@linaro.org> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Cc: sstabellini@kernel.org, andre.przywara@linaro.org, shankerd@codeaurora.org, Sameer Goel Subject: [Xen-devel] [RFC v4 0/8] 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 addresses the review comments from [1]. The SMMUv2 and other compatibility changes have been broken out of SMMUv3 patch. Similar to the RFCv2 all the IORT realted changes have been dropped in this version as these will be covered by [2]. The IORT implementation has to provide a Linux like API to the SMMUv3 driver. 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/msg00242.html [2] https://www.mail-archive.com/xen-devel@lists.xen.org/msg128989.html Sameer Goel (8): Port WARN_ON_ONCE() from Linux xen/bitops: Rename LOG_2 to ilog2 xen/linux_compat: Add a Linux compat header 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 xen/smmu: Add a new config define for legacy SMMU drivers/passthrough/arm: Refactor code for arm smmu drivers xen/arch/arm/p2m.c | 1 + xen/arch/x86/x86_64/asm-offsets.c | 2 +- xen/drivers/Kconfig | 2 + xen/drivers/passthrough/arm/Kconfig | 14 + xen/drivers/passthrough/arm/Makefile | 3 +- xen/drivers/passthrough/arm/arm_smmu.h | 113 + xen/drivers/passthrough/arm/smmu-v3.c | 3619 ++++++++++++++++++++++++++++++++ xen/drivers/passthrough/arm/smmu.c | 114 +- xen/include/xen/bitops.h | 2 +- xen/include/xen/lib.h | 11 + xen/include/xen/linux_compat.h | 81 + 11 files changed, 3852 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