From patchwork Fri Mar 31 07:07:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Chen X-Patchwork-Id: 9655535 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 10D12602BD for ; Fri, 31 Mar 2017 07:10:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0257D25E13 for ; Fri, 31 Mar 2017 07:10:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAB6F28354; Fri, 31 Mar 2017 07:10:41 +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 127E825E13 for ; Fri, 31 Mar 2017 07:10:40 +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 1ctqes-00019B-3b; Fri, 31 Mar 2017 07:07:42 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctqep-000194-L7 for xen-devel@lists.xen.org; Fri, 31 Mar 2017 07:07:40 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 89/C6-03430-A300ED85; Fri, 31 Mar 2017 07:07:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSbUhTYRT2vfdu3mxXrlPxOFRooUTlVz9KE8Q /gX8K6UdYEHWXt22wD9uduVDDVVJakYvAFDPLGTVFS6w0baGsUksr15eQ5UfgFC1MRUzT7t2d Zu+v55znOed5XjgkLrdKFSRrMbMmA6NTSgMITbxfWmyy39fMhImryUn26RoiDaU/b1vEMtAhi dagMlqOSjQTQy1Y9my65emIS1KI6lJK0AaSoAtxqHYHlqAAUk7fwWBq1O4vFi8w6JxxIaFAdD +Chx12JDJOBNaxLlwsbBi4xtt8xU0EC6WtuLBZSm+CyzYrIeAQOhLqSiq9i3G6CsG15bsSgQi m90D/ygwuRomGhvfjUgFTdBpMT133YqCjYKCvGBf7QdBd/t27FKcBOjweb1/OG5R96UWiPhw+ DrzlzUgeb4aec/sEX6A/EHDF0erTNEug93WoiPfCrYGX/qKoEsGlmfM+US8B4yP7RcIphV9lb m/qQFoOj4faMZF4hMGC7QIuTujA9rNBIuJ8cNqHcVF0FgfH0ivfhDsAhssbfRMRMN1bTJSibR Xr/lex7n/VCHOgLRxrOsmaYhN3xKlMWrXGrGe0utjEhJ1xepbjGDWrY1Rc3DGjvgnx5+DHvxb kfpDRicJJTBlKzY8OZsoDVcasUxqG0xwx5ehYrhNFkKQSqLAVngsysWrWclyr429qlQZSpgyh UgWa4rIZPadVi1QPiiVvL7dNYnLCYDSwijBqdpkX0YJIk2NYW7F6mf0oUhFMIT6UXJbNmvRa8 //8BAojkTKYkglWMq3BvOY0wYfA+BBJc94QZuYfpShEMc4btZ/85Pcyyrtzc58cBONFShHfZj 8QVRVjc24sWEppiprPR3GuEJm9/tnuXZ52x5uiGqorP28yvjaxMfu+pPmH9cxc1ojrj3qpLLX Ponpn/D0o8URXVH0mBgNPjLvj8fAih5OAOWg/nVPiyXcp8nKpw/X+IWPfurYvFigJTsMkbsVN HPMX8eXjx5QDAAA= X-Env-Sender: Wei.Chen@arm.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1490944057!94926673!1 X-Originating-IP: [104.47.0.64] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8240 invoked from network); 31 Mar 2017 07:07:37 -0000 Received: from mail-he1eur01on0064.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.64) by server-6.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 31 Mar 2017 07:07:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=w53ijJh1cszN4fEyzq6B71kE9O/zcTkqL+7UHh4LXrY=; b=mvhy1LpUwhHCEkk8smrSAPETOYE7nDgOIgMnZDHbi5707Z/rKrc8MFWZwIGdHqKiI25Z7MoF8O63jIWifgSFih+Of6Vm5mWMPriaxg9x1kKaFr3GpkWCGZl4iDBWd0IUgVE44fB9JEeGD3lI5uALaV5mtKL4hS7yQrHqAUekkYw= Received: from AM3PR08CA0032.eurprd08.prod.outlook.com (2a01:111:e400:8840::42) by DB3PR08MB0217.eurprd08.prod.outlook.com (2a01:111:e400:504d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 07:07:35 +0000 Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::203) by AM3PR08CA0032.outlook.office365.com (2a01:111:e400:8840::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Fri, 31 Mar 2017 07:07:34 +0000 Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1005.5 via Frontend Transport; Fri, 31 Mar 2017 07:07:34 +0000 Received: from P300.p300.shanghai.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.294.0; Fri, 31 Mar 2017 08:07:28 +0100 From: Wei Chen To: Date: Fri, 31 Mar 2017 15:07:25 +0800 Message-ID: <1490944045-31578-1-git-send-email-Wei.Chen@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39400400002)(39850400002)(39840400002)(39450400003)(2980300002)(438002)(199003)(189002)(50466002)(50986999)(48376002)(77096006)(4326008)(38730400002)(110136004)(6666003)(6916009)(305945005)(356003)(36756003)(5660300001)(47776003)(5003940100001)(189998001)(106466001)(2906002)(2351001)(104016004)(6306002)(8936002)(54906002)(50226002)(575784001)(86362001)(8676002)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR08MB0217; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT006; 1:qQ39F06FLAubMF1Hsc7mOdBHVq7QCX4F1Va81M+9RfdNoTBAiQVMqV0eeXoO7OrkVIxOPVZiPn6xuFBMSi8BHg/dIdkjxy+wWNnq6aHUPhXBHji6le3qQ9AuLPrgjnpsod9rxVvns38rC/t/oStGFAjaX7hvue6foNVHRkeZqVCLElfsvKFW5QPoQvr5V7KpVIeIV4KsJ2k0PDpigKIywn3p/6LIPRIapnHUMf3MPQL2dc+lAmITn7OXDZ6LUro9oIAon5Bgotf44L1qptT3lAjsAxF3GsWCKqjN4aHwMeLfs6O06hYPLXJgfBqefWCNf/24e39/rRc3xk+TsnGM0JEZsVZk+4wcGsWz+DvkP+KjQ9vFh2D3v6b5iwPCicXiGIqaRzjYOF1ePxeiftzyDe2bNyNXUIO9Z2v6AJRjjaunjByEcPNZcRuZktr04f2Y7hDo1w5PU5sc5926t1STeL53AUEWas2NRBYO/R7oogtoEb8Tz4c1CyM9ARxZFk3Gl4mkVZxwy8n693Gjhw8KaHu/iMCTIFGEeR1nATtvi5LbArx4xoGJlxF+KWLdon6ngXalPjUKbYtDVhYW+b/rzYpcUjC2SxhjkNIZTA8UZCzb0zCHNQG5BO7qyF+uAPq2 X-MS-Office365-Filtering-Correlation-Id: 5bd53271-e349-41f6-e30f-08d478049b8a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DB3PR08MB0217; X-Microsoft-Exchange-Diagnostics: 1; DB3PR08MB0217; 3:1UdVBJvl1eGhRuWQUKvhoMAuuZXwdtPSVz1YyTfweWxhgwNuamRRdqX+7Nx5gkFxVWdst0XwGwJZ6MHpjuiMdB3/dpiQJ63a2NKrqPxgGTpwxXZVfWJ4PrupOx5y/ZqVrRDf616l+o4waqR9Yjt1taQOcdqfu3Iw212aMId6jZsx7bzwj1qbJeGN2zPTDcZm5qzysKSTKUK0XQH/DszCKRUGEWP2MP8ERTN7nt9dSeGWfWK2rbUo6lPEeSDbe7eBS9X59n73A9UYY+o/RR9qOl1457mCe7fTPrkRo17IVWAOMem8+T8Q33Ha1Ekv/L+pWzThy+ffQZ2kRdasTlKZT/QbS6iRFZ1ZtSWBtFIn8d5WD2lu56QIS5XLGD7g+MXikZu7ops2GAnxpPP4gxfbA928JfHzZvyAkIpcl+70VKgdOdPyHZq6qTgfOTKKRVcGmlLebrGE+UMA2Wa6iafSATeKQRM1ji8H+hWe3CYM7Jo3TSaO4jUG9kkFPPPcGfSxjbHTh14skN3mD1rdL3O1Sg== X-Microsoft-Exchange-Diagnostics: 1; DB3PR08MB0217; 25:pJ9QLpfoKdm6r5Tglc4BvEZhwbN4HZ63SQRp7JGyq554mmTsQ2nXr3ATT8qYsJzPPoMFrdQ8eL3oR+fwb0YctMj1KLy5ukAHCLksH+w7CZKPSAWXpGHIOAX302cipWii/SAEJ0brWnUAoLIaNWJKNePoYtPAXvqsMAd5MGaynS8gyb+ezpFtKTyFB1VUxJtMO/L1vzLLwJVUfwdFsV7MoQ+I0wDy2bzw36R6kDpCkRL2CfskKOpCvj4vhfAyrNuEhuQ/iEtC8LzHfLeRAAaITigeh7uOIuTmfXNTeNS8KVxBrxWwsWHGdpPQgjR9RFBu4g4DOd8pjOCY73gGsRbdiA/86VZau/Y5NP3KsP9MOZpusf0lpOoEYWhLaIUuFmuazDXwKUS4O6Sdeovbxsb27OpTOePX8xXqzvwQI15wjE2PABBHeVpd3IyB2G9kD2COo2PFZZTO5LpaM8AA6BDgmw==; 31:m3fPCCmJH17izx7KjMMjG+YlXuLLzrRyDarYSMK/gNjy0F7HMNVH4zGEva4xAumtMPInYzLpxgvEbKvX8TXkidvXW7i7G6K9W7wT/nMMSI/UyOx9JYXIUsKhwjRBnW9a3E01q0mw4CPpjE8N8psyk/gxHQYTtUS55Rcnh1gNOyHUDcxOAluT9dDgelx4NrihuGnke24LW+fp9vE/77oqJj/6WelUoZP6P1EKxj1jVjKm5+qWG6XPfUZox99jL3217i2XbXh2yldLKDMv3BkyczCHH7wAyjs+zgWs8huEQTU= NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB3PR08MB0217; 20:+fnW0Yh+aJM6S+9T0BDS6H835j/Je8hqgu0kymX6V8frF9WT4ACL0sfXB8DcecBt4BL9h53ThjzYesXuFaHqo/5Cvenu8+jjcjNYVKYNiUNXVC50enF2QfPXfzK1YibRs/7OptWbLRkP98zMSnjvPTbMT+jSrKaF4jWKh1TdCuhFGikYHR2qiO0Arct1edIPQ8UHRvciD6mxor8PC7Rj+HRKK6MAisGaxFz3ZBN4kYKB7CvA2NZ0cXcUMmrXfPOL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(180628864354917)(22074186197030)(788757137089)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13020025)(13023025)(13024025)(5005006)(8121501046)(13013025)(10201501046)(93006092)(93004092)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123562025)(6072148); SRVR:DB3PR08MB0217; BCL:0; PCL:0; RULEID:; SRVR:DB3PR08MB0217; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB3PR08MB0217; 4:dSUbeETTQow6HlxyJaWN4iMAdMFeQe3rjKS1fOV8K9?= =?us-ascii?Q?0rhZUHRtdy3XGlmuG5N+qcRy+w0EQcKDqlOIxPa89iGELuMzMja1plxEU29N?= =?us-ascii?Q?AiWHplhKq51Nw8EG7RTAHCKsQUVB8+12JCCNBcrzs4dsWXCRISWH54saZBBo?= =?us-ascii?Q?kb6wOGOAwpezXJwo9SMVPSK3A/toAy1pare/r36RNpQZFJCZJj26vnSwMPM+?= =?us-ascii?Q?kHglrh7s2bZvpGKyjGRm0Io8i0CUZqbFObzuok8uOSpUCQ9w7YCHTaYe6EEl?= =?us-ascii?Q?ZjFAAsw9ulKQqhM57hCkfP4lOwpOztevDvx3fpmgRmqp2OJ8wAfUD1r9HLSy?= =?us-ascii?Q?8chhx8aJoOYlWrDHlh7/pZQYCHUvSWoyhnnAx4kQtWvrei9EERVRQTV2piW0?= =?us-ascii?Q?Uvgr0LJ1Gt3gX8cT2WIJjq6VJMQfhHUgKJV8CESoXbXIm8lzIOw5xmza4x6D?= =?us-ascii?Q?UUtE21bY3wagS77+6jLqGvzNLLdHpNGgvleVH6lfsad1knaEnxwXGPlxNd3Z?= =?us-ascii?Q?i2zVd/tsyk7YObddcyaPo7687Z96GsmYhJFjNi9W+fBWDC95O5G5ECy9V4jj?= =?us-ascii?Q?C6JqhmoCtJCaNJlTu7umeiqtnvjG1FXXmfSQqdUL1L+u/jYK6Uiu14dZjZZM?= =?us-ascii?Q?2AtH4xKWEYF5sDSvjofnLbcxnkjnxgmwwfI8b9aK928A9EoZUGs9YiNEK9Eh?= =?us-ascii?Q?zuVzvfvLQ5EU+kuM2/sVPpulLwmme3NED2JR5n7WQvOh12XXR+m7TaOYieUl?= =?us-ascii?Q?H9Tccai7E93Cs5ua293qfGTyHVU88pDLnXldngpz+wpHQW7tw+igAYGWI4C3?= =?us-ascii?Q?M3++vVD4YeQ57dDZ7i7EEcs91rF6hBWAjHd2kUtuMJ+IZ2BWUDbzFP+uQtfa?= =?us-ascii?Q?5JkxIj4x+axNEcxxLmxbDuAbFTM9qtf8zQJVky0hs2ZqDD28+A0aa00NG242?= =?us-ascii?Q?MVzU5uPWJJkgY6ZB+nMtqALhY5/fsZkk4mwUuY4HPwZmU+SbhvMy3JK1rHKP?= =?us-ascii?Q?Q=3D?= X-Forefront-PRVS: 02638D901B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB3PR08MB0217; 23:N88qsCljpGwA+jFfXMdhvsemC3nyd8M+bUdX8nUvB?= =?us-ascii?Q?GbGFTfMbNMcDeByD8HFR6Xa7SGGHTQ3ejofIGio56jZ4idsbNI5HvpjfeSkF?= =?us-ascii?Q?KK+FRuD0eyYCyC1vPTkPouslvNVLkOi36mSnLo0OESp6RebutgYOimjrPPjH?= =?us-ascii?Q?d6x4o3zBOw0eTEr/NQx9s6kBBIzyMf9trYBk4qu4a7il0UIuNosoiPK0/TsV?= =?us-ascii?Q?54/vK03bKjg2RtibU5W3xovzyYiVq3neaAu88x11HE4+kiOMM2iphkzuPivx?= =?us-ascii?Q?IBWdvjY2tZL5/Kjwr0Ap9xSrsz4QsVM+JVxFw+YIiHZXF/gXQ45sff0IwH37?= =?us-ascii?Q?CF4FF8ZCXbFLltZrFrCF25/5HBovnCIckJH1Hyo3AsVxGINRRNLfWtw1ennA?= =?us-ascii?Q?v4lfnZreAZaGPaG+ZrjTL5ggz+ZLJqkxmZtJZdDj/Qc3At4kjt29zLWF4NXZ?= =?us-ascii?Q?PCgP0ZvCuRC2N2v1SS4lHv77LeWo7iKKFS7siToPGNiAU1sFlOkbQWpxAqo8?= =?us-ascii?Q?jPzIp0FgDehey9kBxlqJfIGU4cSzraEpEXmVKR4GA+5LIND3IVczA/A0WPgC?= =?us-ascii?Q?BGFM+BMtAY72TEgGeYemL2LINPhQ2kJYlSdTnKtRJfEXazjgAGrXNCnIPlXG?= =?us-ascii?Q?9BE162Ol8RZPwLBotsv+ij+eVzH5KslC6PV6ZDQBWjuIFLxH17649/aYvDQU?= =?us-ascii?Q?WMqjM4HY2aUHsPigbVrll1jGi+4B9JY7mzvKxD0GmMY1zJCBAYyCNjiYYRW6?= =?us-ascii?Q?hYSRBLwzLfVGUSk7Bc9geM06DejFoOA5gVeukoik7VvKg0amjmz+gY9dW+/U?= =?us-ascii?Q?MFRC2HoMiQbw3asR+hdYnzSCkxai/qClIpa+JcEkqaB1rzQvZESS0aLjT3S9?= =?us-ascii?Q?kBltoMHM6yyVtb68ZRQZ1XCkZ407oL5/t7URXAq1AG2XfgpWNe8gugIAYkzh?= =?us-ascii?Q?tFSsvHx4Wdplff5BV+xhL6Do0BbZBwIl4oVnzBAzA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB3PR08MB0217; 6:BK51hZ3XqveRkZ16Mic1cMeyxl71FWgyxb/UjnWiAT1VKIMXFVepC3V0b4lNCgRkt2DASWpTRU/vffwdvFa4rS5qFnr4WQMye7yjKYOzz5/9/mj6ujIXuKpA82p2hC9xdg+FPP5g053pH6pFV3XAdmfegtNtGtxsMCnKj25HKt9dTu/F9yfQGIsRrN31z/wUNh6uKvL99ZW5ImuQc1/Q71PEgREtgK+wP+gTO8qfc6l2hZXBsGAO3uCQ70ZtzQz01aRaRYdoAfH0fmYlFeEUByRfvVnaWVNmQ9idBV3fhSq5oQhThvCO/looDCql9Umi4Uon5mZmDyL+6XaewOcITP2O4maPxZ/cRR8/Iw5Ynp15wG/x3fpUo2zbJfrAet0glfazyuH7d/kEjbie1fIFAw0c5sM6SX43e/jirz/Jb0A=; 5:AuQJ3NMlwjRV/6cbQRJETYsgLTBYk9CzZsFHng5yTEfM9MIKggjYrSC9tB1OH+y+q+clnNfjoEJe2YjAGiHRCNRTgnjeRLy2e4nDVp/S5mNvm3+dctDvcQxsRCCdRFbzOTIyv32oXtZEiIbMASiJp/+Z9le6mPXYDv35VSZP7GY=; 24:xGCFrXfUkuLqFEcacg894V7VrGgObKclo7buTm/FoMFbFSQPLQ2eV4TB8nxfdH3f5qMzJCCWrV/Hgu9KQOwlr/vkMvsYTm85536ZxHIBJjA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR08MB0217; 7:eWRASPkAZXD3dzzDzkeC7r6UrOvKKPqn8PQMz8J5/y7Vm3ZN8OV/KEeWYP7H58mUtLnON7xarO3Xf/qpVr4VLOCHvU3T+i6GtLbDeL8ta9P0WHU4uj3jFrVHU59ZTa+RVX1KLW1NtvFv6P+qoPzmUDHz3vw33uFmAJRJRNQH+nbwZv6AFpLxTKpuYyLIKE6WDuxIR/JYRKMR5hAK63PLGkAIeECxo6ffANBr4lbsrwXdCRv+0PjjZjh5sMogbUfcoxUeW8rzz8/wjNzCrVNBUBYlMq+UALxp5lVv9BtpX/7/WuYSUp7SmE/uawWu/3PHKQ7FHUI0QM9Q2TgEuiUoDA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 07:07:34.8199 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB0217 Cc: sstabellini@kernel.org, wei.chen@arm.com, steve.capper@arm.com, Kaly.Xin@arm.com, julien.grall@arm.com, nd@arm.com Subject: [Xen-devel] [PATCH v4] xen/arm32: Introduce alternative runtime patching 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 This patch is based on the implementation of ARM64, it introduces alternative runtime patching to ARM32. This allows to patch assembly instruction at runtime to either fix hardware bugs or optimize for certain hardware features on ARM32 platform. Xen hypervisor is using ARM execution state only on ARM32 platform, Thumb is not used. So, the Thumb only branch instructions (CBZ, CBNZ, TBB and TBH) are not considered in alternatives. The left ARM32 branch instructions are BX, BLX, BL and B. The instruction BX is taking a register in parameter, so we don't need to rewrite it. The instructions BLX, BL and B are using the similar encoding for the offset and will avoid specific case when extracting and updating the offset. In this patch, we include alternative.h header file to livepatch.c directly for ARM32 compilation issues. When the alternative patching config is enabled, the livepatch.c will use the alternative functions. In this case, we should include the alternative header file to this file. But for ARM64, it does not include this header file directly. It includes this header file indirectly through: sched.h->domain.h->page.h->alternative.h. But, unfortunately, the page.h of ARM32 doesn't include alternative.h, and we don't have the reason to include it to ARM32 page.h now. So we have to include the alternative.h directly in livepatch.c. Signed-off-by: Wei Chen Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Julien Grall --- v3->v4: 1. Use open-code to replace the macro __AARCH32_INSN_FUNCS 2. Add code comment to explain why we can use one check to catch all the branch instructions we should handle. --- xen/arch/arm/Kconfig | 2 +- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm32/insn.c | 91 ++++++++++++++++++++++++++++++++++++++++ xen/common/livepatch.c | 1 + xen/include/asm-arm/arm32/insn.h | 71 +++++++++++++++++++++++++++++++ xen/include/asm-arm/insn.h | 2 + 6 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 xen/arch/arm/arm32/insn.c create mode 100644 xen/include/asm-arm/arm32/insn.h diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 2e023d1..43123e6 100644 --- a/xen/arch/arm/Kconfig +++ b/xen/arch/arm/Kconfig @@ -12,11 +12,11 @@ config ARM_32 config ARM_64 def_bool y depends on 64BIT - select HAS_ALTERNATIVE select HAS_GICV3 config ARM def_bool y + select HAS_ALTERNATIVE select HAS_ARM_HDLCD select HAS_DEVICE_TREE select HAS_MEM_ACCESS diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 4395693..0ac254f 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -4,6 +4,7 @@ obj-$(EARLY_PRINTK) += debug.o obj-y += domctl.o obj-y += domain.o obj-y += entry.o +obj-y += insn.o obj-$(CONFIG_LIVEPATCH) += livepatch.o obj-y += proc-v7.o proc-caxx.o obj-y += smpboot.o diff --git a/xen/arch/arm/arm32/insn.c b/xen/arch/arm/arm32/insn.c new file mode 100644 index 0000000..7a5dbc5 --- /dev/null +++ b/xen/arch/arm/arm32/insn.c @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2017 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include + +/* Mask of branch instructions' immediate. */ +#define BRANCH_INSN_IMM_MASK GENMASK(23, 0) +/* Shift of branch instructions' immediate. */ +#define BRANCH_INSN_IMM_SHIFT 0 + +static uint32_t branch_insn_encode_immediate(uint32_t insn, int32_t offset) +{ + uint32_t imm; + + /* + * Encode the offset to imm. All ARM32 instructions must be word aligned. + * Therefore the offset value's bits [1:0] equal to zero. + * (see ARM DDI 0406C.c A8.8.18/A8.8.25 for more encode/decode details + * about ARM32 branch instructions) + */ + imm = ((offset >> 2) & BRANCH_INSN_IMM_MASK) << BRANCH_INSN_IMM_SHIFT; + + /* Update the immediate field. */ + insn &= ~(BRANCH_INSN_IMM_MASK << BRANCH_INSN_IMM_SHIFT); + insn |= imm; + + return insn; +} + +/* + * Decode the branch offset from a branch instruction's imm field. + * The branch offset is a signed value, so it can be used to compute + * a new branch target. + */ +int32_t aarch32_get_branch_offset(uint32_t insn) +{ + uint32_t imm; + + /* Retrieve imm from branch instruction. */ + imm = ( insn >> BRANCH_INSN_IMM_SHIFT ) & BRANCH_INSN_IMM_MASK; + + /* + * Check the imm signed bit. If the imm is a negative value, we + * have to extend the imm to a full 32 bit negative value. + */ + if ( imm & BIT(23) ) + imm |= GENMASK(31, 24); + + return (int32_t)(imm << 2); +} + +/* + * Encode the displacement of a branch in the imm field and return the + * updated instruction. + */ +uint32_t aarch32_set_branch_offset(uint32_t insn, int32_t offset) +{ + /* B/BL support [-32M, 32M) offset (see ARM DDI 0406C.c A4.3). */ + if ( offset < -SZ_32M || offset >= SZ_32M ) + { + printk(XENLOG_ERR + "%s: new branch offset out of range.\n", __func__); + return BUG_OPCODE; + } + + return branch_insn_encode_immediate(insn, offset); +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c index 246e673..f14bcbc 100644 --- a/xen/common/livepatch.c +++ b/xen/common/livepatch.c @@ -25,6 +25,7 @@ #include #include +#include #include /* diff --git a/xen/include/asm-arm/arm32/insn.h b/xen/include/asm-arm/arm32/insn.h new file mode 100644 index 0000000..c800cbf --- /dev/null +++ b/xen/include/asm-arm/arm32/insn.h @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2017 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ARCH_ARM_ARM32_INSN +#define __ARCH_ARM_ARM32_INSN + +#include + +int32_t aarch32_get_branch_offset(uint32_t insn); +uint32_t aarch32_set_branch_offset(uint32_t insn, int32_t offset); + +/* Wrapper for common code */ +static inline bool insn_is_branch_imm(uint32_t insn) +{ + /* + * Xen is using ARM execution state only on ARM32 platform. So, the + * Thumb branch instructions (CBZ, CBNZ, TBB and TBH) will not be used + * in Xen. The left ARM32 branch instructions are BX, BLX, BL and B. + * BX is using register as parameter, we don't need to rewrite it. So, + * we only need to check BLX, BL and B encodings in this function. + * + * From ARM DDI 0406C.c Section A8.8.18 and A8.8.25, we can see these + * three branch instructions' encodings: + * - b cccc1010xxxxxxxxxxxxxxxxxxxxxxxx + * - bl cccc1011xxxxxxxxxxxxxxxxxxxxxxxx + * - blx 1111101Hxxxxxxxxxxxxxxxxxxxxxxxx + * + * The H bit of blx can be 0 or 1, it depends on the Instruction Sets of + * target instruction. Regardless, if we mask the conditional bits and + * bit 24 (H bit of blx), we can see all above branch instructions have + * the same value 0x0A000000. + * + * And from ARM DDI 0406C.c Section A5.7 Table A5-23, we can see that the + * blx is the only one unconditional instruction has the same value as + * conditional branch instructions. So, mask the conditional bits will not + * make other unconditional instruction to hit this check. + */ + return ( (insn & 0x0E000000) == 0x0A000000 ); +} + +static inline int32_t insn_get_branch_offset(uint32_t insn) +{ + return aarch32_get_branch_offset(insn); +} + +static inline uint32_t insn_set_branch_offset(uint32_t insn, int32_t offset) +{ + return aarch32_set_branch_offset(insn, offset); +} + +#endif /* !__ARCH_ARM_ARM32_INSN */ +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h index a205ceb..3489179 100644 --- a/xen/include/asm-arm/insn.h +++ b/xen/include/asm-arm/insn.h @@ -5,6 +5,8 @@ #if defined(CONFIG_ARM_64) # include +#elif defined(CONFIG_ARM_32) +# include #else # error "unknown ARM variant" #endif