From patchwork Thu Mar 30 23:00:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Goel, Sameer" X-Patchwork-Id: 9655285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02F676034C for ; Thu, 30 Mar 2017 23:03:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E913128623 for ; Thu, 30 Mar 2017 23:03:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD8DF2863F; Thu, 30 Mar 2017 23:03:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 57C8D28623 for ; Thu, 30 Mar 2017 23:03:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctj3x-0007dX-Q9; Thu, 30 Mar 2017 23:01:05 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctj3x-0007cs-6W for xen-devel@lists.xensource.com; Thu, 30 Mar 2017 23:01:05 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 39/E1-08534-03E8DD85; Thu, 30 Mar 2017 23:01:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRWlGSWpSXmKPExsVybKJsgq5+390 Ig4c7LS3uTXnP7sDosb1vF3sAYxRrZl5SfkUCa0bTvSlMBdOFKzauecHSwHhEoIuRg0NIoEhi ytX4LkYuDhaBBmaJR8tOMXcxcnJICERLrNtwjB3C5pO4+OIHE0iRhMAERolfX5sZQRwhgYNME v37Gljg2p9fbWAEaWERcJHo/vGLFcRmFCiQmLPhIyOEnSIxq+sNmM0moCHRf+Iw2DoRgVSJve v/s4EMYha4yiix7N41FpCEsICPRPPt1+wQQ1UlFm4/ABbnFXCSePJkJ9R9ChLHt28DG8op4Cz xeM5GZojfnCQ2b2WbwCi8gJFhFaNGcWpRWWqRrpGlXlJRZnpGSW5iZo6uoYGxXm5qcXFiempO YlKxXnJ+7iZGYIjWMzAw7mBs2ut3iFGSg0lJlLdC/W6EEF9SfkplRmJxRnxRaU5q8SFGGQ4OJ Qnemz1AOcGi1PTUirTMHGC0wKQlOHiURHjvgKR5iwsSc4sz0yFSpxgVpcR554EkBEASGaV5cG 2wCL3EKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZj3K8gUnsy8Erjpr4AWMwEtFre5BbK4JBE hJdXAmP/25TWbJV1vRJ4YG1hc9OJRXCN2sdtsWrOSmFX8UpvDkjNfcXm4t33l2vJgw4GPGlWK 7YcnFaruO/1Rj/P2yt1ROXdO2Ts6qjxz+2Tu+FhJ7+/UNWEr5H8+uzLXRa54a+Af+6ya80ULF kytNeM2mnLSqqM4LcD/XpJ1J/d+1St86WZcnkvFlViKMxINtZiLihMBqIKqMMsCAAA= X-Env-Sender: sgoel@codeaurora.org X-Msg-Ref: server-15.tower-31.messagelabs.com!1490914862!89003500!1 X-Originating-IP: [198.145.29.96] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5941 invoked from network); 30 Mar 2017 23:01:03 -0000 Received: from smtp.codeaurora.org (HELO smtp.codeaurora.org) (198.145.29.96) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 30 Mar 2017 23:01:03 -0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2C6F260F63; Thu, 30 Mar 2017 23:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490914862; bh=unIqjTbGeTaMzi5vORFc3WIPtCiboGFfAfA3yohghJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mP4pRFleZ2U4ZyhCRDF5ZFI6+0vyiYu+uWETdeu8BMHFUioERmtQl2nd/t5Zj41hl gRDNbqVq7ljjENtI699aG/wlPaq1sMHhLiivdDkSaymVFSuoo34OqYQefSIbe6a7ne eCu+xqKqUdJ8OWwhfD5ZgPC+fQ3i4qL0NdLJo8oU= Received: from sgoel-lnx.qualcomm.com (unknown [129.46.14.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sgoel@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5CC8260C94; Thu, 30 Mar 2017 23:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1490914861; bh=unIqjTbGeTaMzi5vORFc3WIPtCiboGFfAfA3yohghJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MQnBoLH8mnSoaVNE6LN/Ni1QfRln+yMnJVW4ILwRSoeLfQiQU/lH7kbQuYlPzXno1 vOCIoB0CeJH+axugYK/KPkx2T6OIgiWwUHW0OLmXuI7m0/yiKf1Wa+coLuB+3MuRzS p4QuHaEQVdauU0Bs64SCdwz0jgl3eB632pzMr+iM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5CC8260C94 From: Sameer Goel To: xen-devel@lists.xensource.com, sstabellini@kernel.org, julien.grall@arm.com, JBeulich@suse.com Date: Thu, 30 Mar 2017 17:00:40 -0600 Message-Id: <1490914840-564-3-git-send-email-sgoel@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1490914840-564-1-git-send-email-sgoel@codeaurora.org> References: <1490914840-564-1-git-send-email-sgoel@codeaurora.org> Cc: "Rafael J. Wysocki" , Bob Moore , Lv Zheng , Sameer Goel , Al Stone , shankerd@codeaurora.org Subject: [Xen-devel] [PATCH v2 2/2] ACPICA: IORT: Add in support for the SMMUv3 subtable X-BeenThere: xen-devel@lists.xen.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.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Al Stone ACPICA commit 9f7c3e148f440049615e2791d73b292f65692d7e The most recent version of the IORT specification adds in a definition for a subtable to describe SMMUv3 devices; there is already a subtable for SMMUv1/v2 devices. Add in the definition of the subtable, add in the code to compile it, and add in a template for it. Link: https://github.com/acpica/acpica/commit/9f7c3e14 Signed-off-by: Al Stone Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki [Linux commit 4ac78baf88d85c49883fcc87d31198ebe408e54d] Signed-off-by: Sameer Goel --- xen/include/acpi/actbl2.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h index 7d66014..d1cd148 100644 --- a/xen/include/acpi/actbl2.h +++ b/xen/include/acpi/actbl2.h @@ -560,7 +560,7 @@ struct acpi_ibft_target { * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049A, 2015 + * Document number: ARM DEN 0049B, October 2015 * ******************************************************************************/ @@ -590,7 +590,8 @@ enum acpi_iort_node_type { ACPI_IORT_NODE_ITS_GROUP = 0x00, ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, - ACPI_IORT_NODE_SMMU = 0x03 + ACPI_IORT_NODE_SMMU = 0x03, + ACPI_IORT_NODE_SMMU_V3 = 0x04 }; struct acpi_iort_id_mapping { @@ -680,6 +681,23 @@ struct acpi_iort_smmu { #define ACPI_IORT_SMMU_DVM_SUPPORTED (1) #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1) +struct acpi_iort_smmu_v3 { + u64 base_address; /* SMMUv3 base address */ + u32 flags; + u32 reserved; + u64 vatos_address; + u32 model; /* O: generic SMMUv3 */ + u32 event_gsiv; + u32 pri_gsiv; + u32 gerr_gsiv; + u32 sync_gsiv; +}; + +/* Masks for Flags field above */ + +#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) +#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) + /******************************************************************************* * * IVRS - I/O Virtualization Reporting Structure