From patchwork Wed Oct 11 19:01:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 10000361 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 925A7602BF for ; Wed, 11 Oct 2017 19:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C29028B23 for ; Wed, 11 Oct 2017 19:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 710ED28B26; Wed, 11 Oct 2017 19:04:11 +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=BAD_ENC_HEADER,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 28A7128B25 for ; Wed, 11 Oct 2017 19:04:10 +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 1e2MGM-0000QC-6u; Wed, 11 Oct 2017 19:01:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2MGK-0000Q1-8R for xen-devel@lists.xen.org; Wed, 11 Oct 2017 19:01:48 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id 17/A8-30115-B9A6ED95; Wed, 11 Oct 2017 19:01:47 +0000 X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ower-21.messagelabs.com!1507748506!70107027!1 X-Originating-IP: [104.47.2.46] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19104 invoked from network); 11 Oct 2017 19:01:46 -0000 Received: from mail-db5eur01on0046.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.46) by server-10.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 11 Oct 2017 19:01:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=q7YUDltF96Fc1rpiSb1CsFIryqr1aMfSGaRF81jUnIw=; b=AFG5AM0sWfxZBMugqsLLEFgfDc7rSBxCYdH/OHWHI8YY1VtLVKocHuLvfchrhPTGv1CYlQdBY6sSvAGj3rBsjAb/Ujd7WQolIG7QxNCqOzTWT10geBlYyQniUNG9sJ7irtWD61q5EMKji7MU+RZcxo3suC8o8n3Ef9eddzq5M1Y= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.56) by DB6PR0301MB2133.eurprd03.prod.outlook.com (2603:10a6:4:46::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 11 Oct 2017 19:01:43 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 11 Oct 2017 22:01:40 +0300 From: Volodymyr Babchuk To: Stefano Stabellini , Julien Grall , xen-devel@lists.xen.org Date: Wed, 11 Oct 2017 22:01:21 +0300 Message-Id: <1507748484-16871-2-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507748484-16871-1-git-send-email-volodymyr_babchuk@epam.com> References: <1507748484-16871-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.56] X-ClientProxiedBy: AM5PR0502CA0013.eurprd05.prod.outlook.com (2603:10a6:203:91::23) To DB6PR0301MB2133.eurprd03.prod.outlook.com (2603:10a6:4:46::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16dd8e69-7da1-41d8-53d3-08d510da83c6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DB6PR0301MB2133; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2133; 3:5mI2fpQYBO+tQ/V4EphqqDanvDQ3v4lkKWolWSqQwCL6AhrEs0TQV/BGCNxV5ddiXXOHMxXbfN7y+t87GkEWGfzujF4T+yqDSS7Mbpg+wKr3lpOW+RINYHbhE7s0as31DH5wLeFzNe+qIs4nVU//H+BaTBzu78iAw7BajTHVwSddl9dOrgkLTculhoIClwW0T01f9KuAV58A31jO0KSk9R1aOSSPuuM9Mkgh6/kRwWipDaOELaHR8JGwapN0N+SW; 25:QnAlmry0Pf3fLkRuRq/xijVb9UiQngKVfcc7usRmwk4+X8Ue6Trt0Yl30aa3DiM5DHwPDMzfO56mI2eVOokRBq8goFJYyo6B9gFrDLudCm2hJq49Yzue9hTI/8sSawvX1j/Z97XiYdhTpwaK5wfDQQ5ah3D6G1sEmhY5KdPMBSx7pU1GsswBaToH/oYO78Cv2brxdlTS+0VZKkhP8y8ZqZuHB9UG7TgbjzTmbb47w1T+KMYgqGmsT7zDIYdYGinyhr0PBkA8IWD0Hg/f1LY7dP0KWs0KazqE1/TjZPiFjoF62R3Ls4e8U0/U+lBecotH//+fxk4L7A41LrelGVYYhA==; 31:iBa1JRR6+tKKVcEV4dMU57zQexRvQqIM+bsHoAkJ00j/NDLXntgTnsLUqwpPl/hf8xVlgaJR5gBrA5pbR0WOqkSqRLIFBNQYxW2EAWaOo1oXTz8RfrXkXkBqtJiCdpYj8tcl09yAJItgkD5Is8YUul5LHn0RknkbVICZf8YelJkGyGRqh/s83jXJGbSwgRN1+XMYerOTUYKAEpdNPEjj0v6oOgt31O+IOP17j2+RRq0= X-MS-TrafficTypeDiagnostic: DB6PR0301MB2133: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2133; 20:Nq0wICI0UQvk1YAf3+Y6wY4sr5nlRYUK2C4FNyGCuc6xaClaHSOTwTZMs5of3eGD7lY7WdTrpUVvz69vnV3cTUZb4TwHlHvPQsnX5Q5uEWub0ibIrehwdBJD0/ErNBinBAenyOBnALhADhlQivfmgS+wdnkp+2Yx9NJBPAvHF0B3v5KfXxRZpsZyAIpLAJ8GR4w8VZU3/PNPXv293z8tnj6kXPzV3Otix/Q9jP3/L1g7+oICmel4INKRYRdfaihr9N4rqqTycjBclaWlbD3aqY7nAqFu0DcTUmXX5JFU+2w2fNDyPva7VdacqDZ87rko+mEOU+hkS/eo3Sn9gxG+fv8itYDjXFpvMbk0gSp/QBj1Meizy7TPCEtnZSZj89YyZzAKJrPhVFT1hCVnD0RuU181ob32IGqm50SD6Sdz5QRcHVPrx2Vsn8M8xhCR8WxLYUdtUgksj+6qpJQaPkjZRZ7VuR1oFmJfgipfznQEt1+wPQm/UqaprZ5eMpaJUk9l; 4:eRUwwX6QRCDzcd5fEQQVjQaprX1NywzGniRav93K+nQKQWxgSv18pxpPxox+wZEaL+rxQL7HLcCf6IY+mqqcj03Gtr/fKAehLbbyj/aOc+j52uAf/ujDt/Km+vFuKBEHWJRL6h9al2dY6X+BSJk6Po/vUkNKqWqhkxYmleoWO9RfryMueKH9orQzkenUjdVh7l2DPvBSveXtPKi68hm1r+d5p7MPfhKQGrFISuqLrdI0BaKGvsPL2+ZFBfRd84q5yDvqgLdnKZWI4MEckmcWC2bWrmIxt6Xq4QYaYA9Iz1URXZEvijC9MnJNqlhhJ+2GZFxQM5WuL1M/uHsGcNVwhw== X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(4114951738403); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0301MB2133; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0301MB2133; X-Forefront-PRVS: 0457F11EAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(189002)(199003)(66066001)(122856001)(2906002)(50986999)(2950100002)(47776003)(106356001)(305945005)(5003940100001)(105586002)(101416001)(7736002)(8676002)(76176999)(81156014)(33646002)(4326008)(8936002)(81166006)(86362001)(189998001)(36756003)(80792005)(68736007)(8656003)(97736004)(3846002)(72206003)(16586007)(6306002)(48376002)(42186006)(54906003)(478600001)(966005)(6666003)(316002)(6116002)(50466002)(110136005)(5660300001)(50226002)(53936002)(8666007)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0301MB2133; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0301MB2133; 23:BottzPwjUA9GcFVv7a5NbUf0lpUNVeToVj+m85T?= =?us-ascii?Q?BKnBXWVo19/a9cn1ApsA67VYiqC6ajuskQZKCD1zHdovrgVDVlXVYXYdU08O?= =?us-ascii?Q?jV4sN2Bu7DszCJEYh2mFO2IRek07Qm/daTXLTwz7Jfq6/tZBgkGJIbM7+Vra?= =?us-ascii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Otm0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2017 19:01:43.7833 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2133 Cc: "Edgar E. Iglesias" , Volodymyr Babchuk Subject: [Xen-devel] [RFC 1/4] arm: add SMC wrapper that is compatible with SMCCC 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Existing SMC wrapper call_smc() allows only 4 parameters and returns only one value. This is enough for existing use in PSCI code, but TEE mediator will need a call that is fully compatible with ARM SMCCC. This patch adds this call for both arm32 and arm64. There was similar patch by Edgar E. Iglesias ([1]), but looks like it is abandoned. [1] https://lists.xenproject.org/archives/html/xen-devel/2017-02/msg00636.html CC: "Edgar E. Iglesias" Signed-off-by: Volodymyr Babchuk --- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm32/smc.S | 32 ++++++++++++++++++++++++++++++++ xen/arch/arm/arm64/Makefile | 1 + xen/arch/arm/arm64/smc.S | 29 +++++++++++++++++++++++++++++ xen/include/asm-arm/processor.h | 4 ++++ 5 files changed, 67 insertions(+) create mode 100644 xen/arch/arm/arm32/smc.S create mode 100644 xen/arch/arm/arm64/smc.S diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 0ac254f..c69f35e 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -10,4 +10,5 @@ obj-y += proc-v7.o proc-caxx.o obj-y += smpboot.o obj-y += traps.o obj-y += vfp.o +obj-y += smc.o diff --git a/xen/arch/arm/arm32/smc.S b/xen/arch/arm/arm32/smc.S new file mode 100644 index 0000000..1cc9528 --- /dev/null +++ b/xen/arch/arm/arm32/smc.S @@ -0,0 +1,32 @@ +/* + * xen/arch/arm/arm32/smc.S + * + * Wrapper for Secure Monitors Calls + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +/* + * void call_smccc_smc(register_t a0, register_t a1, register_t a2, + * register_t a3, register_t a4, register_t a5, + * register_t a6, register_t a7, register_t res[4]) + */ +ENTRY(call_smccc_smc) + mov r12, sp + push {r4-r7} + ldm r12, {r4-r7} + smc #0 + pop {r4-r7} + ldr r12, [sp, #(4 * 4)] + stm r12, {r0-r3} + bx lr diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index 718fe44..58a8ddd 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -8,6 +8,7 @@ obj-y += entry.o obj-y += insn.o obj-$(CONFIG_LIVEPATCH) += livepatch.o obj-y += smpboot.o +obj-y += smc.o obj-y += traps.o obj-y += vfp.o obj-y += vsysreg.o diff --git a/xen/arch/arm/arm64/smc.S b/xen/arch/arm/arm64/smc.S new file mode 100644 index 0000000..aa44fba --- /dev/null +++ b/xen/arch/arm/arm64/smc.S @@ -0,0 +1,29 @@ +/* + * xen/arch/arm/arm64/smc.S + * + * Wrapper for Secure Monitors Calls + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +/* + * void call_smccc_smc(register_t a0, register_t a1, register_t a2, + * register_t a3, register_t a4, register_t a5, + * register_t a6, register_t a7, register_t res[4]) + */ +ENTRY(call_smccc_smc) + smc #0 + ldr x4, [sp] + stp x0, x1, [x4, 0] + stp x2, x3, [x4, 16] + ret diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index dc6ab62..71f3e60 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -787,6 +787,10 @@ void vcpu_regs_user_to_hyp(struct vcpu *vcpu, int call_smc(register_t function_id, register_t arg0, register_t arg1, register_t arg2); +void call_smccc_smc(register_t a0, register_t a1, register_t a2, + register_t a3, register_t a4, register_t a5, + register_t a6, register_t a7, register_t res[4]); + void do_trap_hyp_serror(struct cpu_user_regs *regs); void do_trap_guest_serror(struct cpu_user_regs *regs);