From patchwork Thu May 24 00:46:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Goel X-Patchwork-Id: 136690 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1557334lji; Wed, 23 May 2018 17:48:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpz59uZYz2nIFkQFwfzxYp58obY+jM/Q7ZTJbuNssTXlicxXGJqKNqOva2zTd0LXpKKgRD8 X-Received: by 2002:a6b:1f4c:: with SMTP id f73-v6mr4379239iof.236.1527122938841; Wed, 23 May 2018 17:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527122938; cv=none; d=google.com; s=arc-20160816; b=rLUr57kjoNbE/mRGfhjgmVKdhLH7yYArHVfcGacHIXBSseXzi6UOet6PVLBICLrOdx LyYnkgHJokvROvoTtdUJuobjY/e9s/QaX7f0b7ne8TKNvFmtEtZxYThbxNhOCE6qmw/I cD1Vfr2Yueydi4KTV6CQNvMEBy7Qkwzt3yQHPGLMtSIIK4m/yWEDgvPDZ8jRZIXosOqe /q26AGotc4t2fCLIBdd5HCSwLtCjNN4hLZYF6z3AFL1B+dqtyLKodHjlyoJU/EFwxGF3 qQ8YpmtYlLYSj1KsN81xLoFzJPp4ZOWFy4x4wTV0fonCK0fFOC/R5d4gve1PYA58kj1d Bs/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=E+xUTulx0gKb089w4XhX57CCj8LkqscxQsgbCbfhVzo=; b=EZOK0mhkh28zwyhw1RfvO1FVFEVWJTYIssyoaBLGU3CofP9hmGBmyn5852Vg4XeeKo q3TKm3MGOKhqqSBnmieHJSCwUMyx4fnFyyvmqv67dcTVXp9qeYpcmNlYNE6rJsooYzeP H6Fgqqqbn9w3zkXcHgXOp0uaTRH4Od4/JkxQo5ZwE1f8AtoDr9LYvIUddsM8K+sUqLMq SHLlwwf0JJOMOc8A+ZaLbDaFQoaNQK6Fk1gbFKo9tVvpW+b8wX3kzaSI5zvFToyiBGMn VADnizgqyskJSwOZ909a3icQceGYqNsZFVGqczCBWSYTVbipsrEFE9JLjCC61xyhKwES Q3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=O0qorzpV; 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 v64-v6si9561509ioe.287.2018.05.23.17.48.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 17:48:58 -0700 (PDT) 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=O0qorzpV; 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.89) (envelope-from ) id 1fLeOl-0001BK-KT; Thu, 24 May 2018 00:46:31 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fLeOk-0001BF-Ec for xen-devel@lists.xenproject.org; Thu, 24 May 2018 00:46:30 +0000 X-Inumbo-ID: a090b853-5eeb-11e8-9728-bc764e045a96 Received: from mail-pl0-x244.google.com (unknown [2607:f8b0:400e:c01::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id a090b853-5eeb-11e8-9728-bc764e045a96; Thu, 24 May 2018 02:44:34 +0200 (CEST) Received: by mail-pl0-x244.google.com with SMTP id v24-v6so14038441plo.3 for ; Wed, 23 May 2018 17:46:29 -0700 (PDT) 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=cRln/nU6TpJ0rq6Zhy3H0UMSMRg5BYhbbzC05rA+fpM=; b=O0qorzpVPVVtmiiAhyqvalotTOHbfnyGVVAEqxMbdzXpx0n6od3DbnQ5Xwbh8S1JJb /Y3hbXpUJRWsY8oxi0aYSCEBLiy6zppwCgCHPPOgiUS7sxqyP3HfOzM6jUbMerMpzq7P afPHNr2s6AcwV3T04/Zd3cS48C1e9rlqZm5YI= 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=cRln/nU6TpJ0rq6Zhy3H0UMSMRg5BYhbbzC05rA+fpM=; b=dHzu1FbNsIsedq1zBt+edC6vhK6fFvPxnBVpfLuFQYWEgf9Tem5aYLfSzeq1xlufN+ 3NKvv6hXrxfCQnD7Omrfpw0wATkM4MXukTzlTdw6G5QZ4n3n2FYuZDuPt3hEDmh3VyGx MGDSV+X2J1sBIfUknfz+z0oZdiv+gMzSsNFhNVq8lGASBeCZXmvFEryTYL9uWXT12CXW jkPYqZnccGOXYOuoy7/24i+2bREWvkxwMlXNIrUmHHkgKj15K8gO4aNfoANmIwzQlQjC /41uNx9Vh6qLFINpFHT843KrTuVsNVTyB+x8SBB1me7YXKMP9MJrv8j7VBevysv5Mfkv Xx3g== X-Gm-Message-State: ALKqPwdA57W1yo6UeVw7G5uBd6rVxlHF56AOzC9rlPIKOVxiPpjCXnP3 hKNQKeXjrRB9ujPBCC41JLyGjLo5seE= X-Received: by 2002:a17:902:1004:: with SMTP id b4-v6mr4982646pla.82.1527122788021; Wed, 23 May 2018 17:46:28 -0700 (PDT) Received: from sameer-ubuntu-book.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id q15-v6sm18428438pgc.33.2018.05.23.17.46.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 17:46:27 -0700 (PDT) From: Sameer Goel To: xen-devel@lists.xenproject.org, julien.grall@arm.com, mjaggi@caviumnetworks.com Date: Wed, 23 May 2018 18:46:14 -0600 Message-Id: <20180524004620.23828-1-sameer.goel@linaro.org> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Subject: [Xen-devel] [v2 0/6] SMMUv3 driver X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: sstabellini@kernel.org, shankerd@codeaurora.org, Sameer Goel Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This patch adds support for 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. - Tasklets for evtq and priq. [1] https://lists.xenproject.org/archives/html/xen-devel/2018-03/msg01108.html [2] https://lists.xenproject.org/archives/html/xen-devel/2018-02/msg00713.html The IORT support will come from [1]. Sameer Goel (6): Port WARN_ON_ONCE() from Linux 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/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 | 3667 ++++++++++++++++++++++++ xen/drivers/passthrough/arm/smmu.c | 114 +- xen/include/xen/lib.h | 13 + xen/include/xen/linux_compat.h | 84 + 11 files changed, 3917 insertions(+), 108 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