From patchwork Wed Jun 14 14:10:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9786365 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 CA7B46038E for ; Wed, 14 Jun 2017 14:41:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDB7527F82 for ; Wed, 14 Jun 2017 14:41:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B26B42856E; Wed, 14 Jun 2017 14:41:29 +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 D50312838B for ; Wed, 14 Jun 2017 14:41:28 +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 1dL9Re-0002dd-HD; Wed, 14 Jun 2017 14:38:54 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dL919-000106-Su for xen-devel@lists.xen.org; Wed, 14 Jun 2017 14:11:32 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id A1/35-19466-31441495; Wed, 14 Jun 2017 14:11:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSe0hTcRjtdx/zJl65TsVvU8NGkRjzAZnRU8W gjCCKBBXSu7q50R5274wJlRoYZBqWZZvZO8bKULES0exhD0kta4WVhWRYlikZM4NW1L27s8fv r3M45zvf+cFH4cpfpJribFaON7NGjSKQ0CdgCdrgjLTsRM/k8iUXvpwnUtGaex1ebAPKIQ1mn cWWT+pPDXYFFLozbKNTQ2QpGllSgQIpginDoe7HR0IiiKlG4Kip8hElU4XBp/FGkcwWyVYYPF hJSljBLILG0/0BEg5jImHA8xRJAzizH0HZrRasAlFUKJMBY55dkodg5oP39Vmfn2YyYdJjV0g YmDnw8tEBXMKzmXVwc8oVIO/KhJGTnwnZHwIPHCM+jDMAtz98wOXZudDmPOrbC8xxBK4b0wp5 eAF0esf9pmi497CekHEcVJdd9eP1cM3RT8rYAs1vO0g56KcC+pzP/aluBdQMOPwTRqj0jgfIO BNcdV1+0x0S7J1v/FHlNJQejpJxFFy83ovLpgoS+hwThEy6g6Bj35CfPCTgTvsJrBrF1v3z27 p/fnsGYZdQrMDxuzhem5QSr+MNBXqriTUYtUmJyfEmThDYAs7I6oT4rRZTCxKPYZb42tCT3rV dSEVhmnD6WEhatjJYZ9lWrGcFfR5fZOSELhRFURqgm9JFLYTnCjjbdoNRvKgZGaggTRj9bpUo 00IhaxIMBbLUg7RUc0PTFKYkzBYzp46g26QMRjLpi8x/Imbu0o2i1aE0Ekspgwo53mSw/q+Po QgKaULpYCklyGC2/tk0JpbAxBIbH6dKJazsX0ldisJj9gynv7i9dHdPr7t3R7bKVY9/VBuyxk x8a+DgCqcpMW91d3hDxqtWXbI991uLt3wlrZpwaUbP4bU7j0TM0+Xa0+7XLsvKb/+acjZu4V5 XjdW5s9K5OJetinlV2xxWcsi9Ia54OjUku2Lz8CauJDK/f0vn+++XVe4r2meuuzkeDSHo2aQ4 nBfY38ssIRuSAwAA X-Env-Sender: Volodymyr_Babchuk@epam.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1497449486!89377984!1 X-Originating-IP: [104.47.2.47] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG, UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33135 invoked from network); 14 Jun 2017 14:11:26 -0000 Received: from mail-db5eur01on0047.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.47) by server-15.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 14 Jun 2017 14:11:26 -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=ZdkqgfaZDe3hWUcxWXsmfxJYCSxlu/u/CnMzO3QIoqA=; b=KbhM9AeSL1p7p7u6CUH9HZi7MnLToJTbkVhrwMzKKhBliCcxHiTe1e3QEYJybAn+8e9wDPfh46tyZDK8AAO04TG5Ti/gSrzBAiUwF+/VeDNobM+q8GyzlL2Wgz4RTg1b+o3pc6TLrhIxmsu5ilnTrf8BfRf55Iqelk3g9YTSu+0= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.55) by DB6PR03MB3093.eurprd03.prod.outlook.com (2603:10a6:6:36::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 14 Jun 2017 14:11:24 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 14 Jun 2017 17:11:21 +0300 From: Volodymyr Babchuk To: xen-devel@lists.xen.org Date: Wed, 14 Jun 2017 17:10:44 +0300 Message-Id: <1497449445-23112-2-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497449445-23112-1-git-send-email-volodymyr_babchuk@epam.com> References: <1497449445-23112-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.55] X-ClientProxiedBy: AM5PR0102CA0033.eurprd01.prod.exchangelabs.com (2603:10a6:206::46) To DB6PR03MB3093.eurprd03.prod.outlook.com (2603:10a6:6:36::26) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB6PR03MB3093: X-MS-Office365-Filtering-Correlation-Id: 25b13909-cf43-4ba5-73d6-08d4b32f3da7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DB6PR03MB3093; X-Microsoft-Exchange-Diagnostics: 1; DB6PR03MB3093; 3:GcPDvQ6hppXk4kcLPFgBUVup+LkFYTTLMpLILbdN4BqJEcAZWwa6UQ2+1YjurGcMHoBMlm15s6u9Km4+d2m0ZEmqyrUrm/b5WFZ/85TjcMl1iyS/wCh9KJJMy4KApc3nYy8Zn82QGLe0njYCu/K/eqVzkRQY/hf06IozlpG1Uk9g1hFddLk5zQGv8Mf8r8OGfMAapLx1QICZcjDKg2+EKp4VufYn9Po0iLg9hlV9a6gxHiCqQv5/pWmZSPRWukzgdh1CFZ70k0LfQ8JOvgo2WjGpg+wPBIjXACmfcqJc0c1e5oCJuzHbKROWmnbYGRo2WMx7t1ys6jyBtlGhIZiXkw==; 25:pPMc2H2AS8+zM3G27ioI/C/C2RFRn9QfRxV/pZgUtdjfHXSBe1VTkQTcGVjiezypbGRw/F9/BPpci4Ou6e3f17xRdmG8U+XIYz/h6hozl6WqtjvDb1dG51b0WcSrP4uayH3McZhTwL/SmDEPH91AKSfBDKb/AuYxfCKgtca9NguWgSY6aGfKKGSFycqjT4BBE9ugm7GrRiP5u0vvINrzkLB+DYMkuvlaIs/533Uj2hi67RoaHt4nXzBIezLtpm19yK9QZ5mFkzE1l+8RhHZW9gCyq3Fk2HuWkCGXWAcywg178Tywte9PrJek6CR09Vx83FFjb1PYrsbPRDizfxxXb5YgashgWKp3/ZSZdkrZuHGBWw75ZkxswMh352n4ku3Ne/L1T6yILGVznAUawBGfFnZjq6PS3IbauLJay3ipN1hOo90PkxUJwVxdIgQ98COAdJuQUfnzbpn8T6sHubXFBwVJjTBI/jWcpT/65i+Ds+M= X-Microsoft-Exchange-Diagnostics: 1; DB6PR03MB3093; 31:qrJqp7d0l+++1/z/cbYRvyCNZkOiO3vp137MUf4N2BZc52KQLMbYlBUL6XegCHtlgOAGaUe7rvELX1SWo2wv21RSbi4ogfsmg9iRKlmVOD/yVyWy43/iPLXvu3qBwmwXxwWaIgNZ9u2BEzdcuXjXuYq/64QiEgl+20dkitMycBa5OmocmAPQi/JgwYximEarWzIlBG3cplnr5lhr0hWtedO+acl1xQ8LE8/aGevf1LuZL6yOTfYqiaTeFnm5teUxt5RUG7QQZViIeuBGX2f1dg==; 20:vfu1ro6rIM6YnPuepTXrHjTdVBfpzKSsfhIl9Xx/T63Z0QijH94ArHZSp8YNx1ojZhWs0Sjb6BW3JIhsZ6uipqFrr3JhEg679r0AspCg2GMXtYwaZhQNIrCtNBU5TjURYluZ3rILOUKfWGhHBJc0q6JIJ2/RBTu8/LXLCk1okP+F7/HQDZRN30vJjdZSJpp+fr6RaiMfBQmmprbkS3snuGsAHP6qInAYjVyrCwA4Y6qqzvgsjr7YpZl+csxkQ6EoBSv9uIXjdmzeG9gnmY27DicA1YPX6Gxd2vLORhydMWpw2+5swnj1nAOpDZtLV8dYp1oprmMVf1sOwl8RwJ7HeT5xtIUMV9PQgjdiz5CZz6uMtq1rTam03M66biSTq+shFQK5Bn94B6Uv/DGxet9BLmjse34Mx4lblUbv7sb/qQF12hQxHZ+USU06wV+um2SDrAxHuf2bdDIEvqsbjE4Ds+Y+pK6QgN6feehCF76R1i5TTAyDz/WjCaWFJsREBi0o X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(4114951738403); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR03MB3093; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR03MB3093; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR03MB3093; 4:++p7UHvAYZ58SUKjsw0A4iaqx0mMms1HhX7Oi8QOH5?= =?us-ascii?Q?TxIWSyb0kbqvFZKVG+YIt9tb7GY86qVWhV+x2N2R3X1OI55YVaQOX4UtVR8n?= =?us-ascii?Q?uc5kyugnUmjoFTUQ31Gt2QWdicgs/y3DDIHW8/G3Ygf/9jj3zFmtbXM5Apbl?= =?us-ascii?Q?qnFIwmVwZr9lt7xXSbTeyRN9fZf3YEI3FYmz+4XBmhI04YMtsDUMFQKGclVp?= =?us-ascii?Q?wL9p3ga2wDriSIcCbWM8u6CUenqK3EYB4S3/rYd9LWQ0y8PAjpt7UPdnsYus?= =?us-ascii?Q?9bNX0K34vkAoZU1q3cDwB3Y/Bh/L+eijzHhxbg8z3CE+nb1tkuYmb0KSXhPO?= =?us-ascii?Q?MQc7FZBujl0l7+3q7TUM02ahJ2b2zaH17L04lD68+07AuhzXb8z7aIYn0KTG?= =?us-ascii?Q?mfyJUdIWwqduI2YvgfFcozBaiICJn229YidtB/9fw9DJyXBX+0HkrhO/PPL6?= =?us-ascii?Q?xHZraj2lBQB4azdNgO6/9vsn0a9PViA62G1rk7kjkbts+PXMmTWWDVtZpGtU?= =?us-ascii?Q?S8qxhkzGHzs+3boujGSc3EKWEsu2uqmZdbr882Zsp206FrWlDxAzTAgjYd+1?= =?us-ascii?Q?ib92JNxIaq0/DlEbXtLD1Mj9l9GbtiT8DhgJQzqU5cRZNObu5qbi4RckLa6S?= =?us-ascii?Q?J3iVdShhYScC8/FRMNF4qS5ZVPRr+UvVol9uZshJQZUp2XGrCECZta6td07o?= =?us-ascii?Q?mvSNPhsz5IQb/Nea/b3StSSXab5qFGdOz7IKEcdMzfpvCEt4Libw8J8EJlzl?= =?us-ascii?Q?3Fdn0Wqfx/jIMfBG2/O8Uf5E2PB5G4dHLlfGSHUgMHp/n2AGCMOhptVMidQc?= =?us-ascii?Q?6PedP+d0Y35eUEM3NMoGDwTjko+UpYx3mN3Ilkuh399lx8lspcStotMX7qiW?= =?us-ascii?Q?6NC3/V0ukVm4ci2qjEUbaL/fAdRmeS2cWX3PWGZGx2lcjvWD3/i9Ecy2yMjV?= =?us-ascii?Q?JOlv6J+weN6VtAf6SZnkn/hEei6lR4C4AScsVEibgAHQbN331Us6Ypihz3ZM?= =?us-ascii?Q?ZC/HpIHzWZbNsBpFpWoUtNcn1fIJJi60OcaJ8Q0mtsyuJq5uzoX7JLSPUc3a?= =?us-ascii?Q?vzn5+4NQNz0NGWHS4+ALrbuKt4tFHQD84kbg4NCpKmpc3a4MeDktk92+GPEP?= =?us-ascii?Q?7nY5J6nMNtAI23ZwK5WKLz+Kztrngf4KQMC0+oM68b8JTM+KzNXMFhuAsnqi?= =?us-ascii?Q?iz0YOmYS8Ij7U9ZEaAHPwdzLjfQMfnhA1PVG6Hi4wEdBp1NMyl2kSCtA=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 033857D0BD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39840400002)(39400400002)(39860400002)(39450400003)(39410400002)(8676002)(6306002)(966005)(72206003)(478600001)(54906002)(36756003)(305945005)(50986999)(7736002)(76176999)(80792005)(575784001)(50466002)(48376002)(347745004)(5660300001)(2906002)(2351001)(2361001)(33646002)(189998001)(2950100002)(4326008)(107886003)(86362001)(53936002)(6116002)(6916009)(6666003)(42186005)(110136004)(47776003)(50226002)(3846002)(66066001)(81166006)(5003940100001)(38730400002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR03MB3093; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR03MB3093; 23:rIYm5eDaNNhf/80f6wMbaFZosaiV1lBb9/milWe/A?= =?us-ascii?Q?iiJbyTQALqgP7XPeMJ+S5aYLSD3GQzsc5RTBt0g+lE+Z7di/HBqENFwzLJBN?= =?us-ascii?Q?k7WMLTLrsfUhqi0XSGTNug5+zVVR7zLIX30om6YV6XG8cwO5LHrlPrFd2V+i?= =?us-ascii?Q?MSNcFhN/huLUEz7DV5YwC5jCZhTsAgoBvupQM5juBnxaF/yGieENfAu5NzId?= =?us-ascii?Q?MuloKPGsLCAsDe9rGdiXULzPwI1V/XVxezW+Mjg6MgtqzpdfMXhq76oB9707?= =?us-ascii?Q?22Ez0yxTk6RagB+MKeZ6NNLaL3DjBkoAsd53Wi4FaJoqlYyrjbvxRW8teZRo?= =?us-ascii?Q?vK1KmnOGA8/E6BwwwDiMobHtVCgmtWE4K6Ayw3xi7IHplNrtXxk9U7YQqtzI?= =?us-ascii?Q?+j+iWX9CukQwJQF/U2WsIQFLJ6dLoAY0yWRpytqhOii9gP0wDhlO3iPpeIuf?= =?us-ascii?Q?XvfgasSDd76m/dDVzAUOceTMjSvDVn5mw0ETPJY2mEXXivLns0/tpNt7GAdi?= =?us-ascii?Q?c3hbKlFah1nMpevdIvnf8wZhy/UO2EenTAz8fNWo77uZStlmuJIuvf3WqmYm?= =?us-ascii?Q?X24XmCTBOrS10xumtFxtGus7PMr+vnGqjC4sFPmxod0YLjb8ehFYry7Ebjk8?= =?us-ascii?Q?PoiAO14/9UHIDhnwREg4b19hDjJR7LKlzXp/r2p4cyOvIPkBW1P6kysJjYgN?= =?us-ascii?Q?joeebQdcDt9ravfAFSFEGjR2OZ05I26x/RbAn1p87H8EsSDQrdGzzH10e6u1?= =?us-ascii?Q?tajFikZYEZPyE83G5ElLS3Db+pvTyQVHlDknRbDwPQlLCczbTR7pR0njP9++?= =?us-ascii?Q?Ub8IwhalA6JaiAIbON8Accd5QP0HMu1kVm2DdR5W/6JiD6afGzZIFjAV88G1?= =?us-ascii?Q?MvZiODly6TonfC3Hc8TOXCA1ZDCBdy7kMclj7ZQ1TelYsAvysYAZLg/4hx5W?= =?us-ascii?Q?YRGcOwdiLYzX3Ty9z5xgglruZUHJ3LKnsg2CnN7BG3wDIparfYGRdSeVPiTj?= =?us-ascii?Q?dftRigqflh7r3GuWpT5un6wQ9/oXgKzrMV+VY0IY4I5npYtvorOZ40jQY3qs?= =?us-ascii?Q?WrtwLFwdllr4Qa9HOaRYgwy3zRexcwiOZoJUhsOUvPnVxPDztq09BaEyAID3?= =?us-ascii?Q?xw4lzWP6QB+voPBdKH7K9mTYZwjZ1Gk1S/2udBTnapXGIjw9DYlZj15r9ebL?= =?us-ascii?Q?sdQv+t+OkEVIDY=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB6PR03MB3093; 6:lXRRo3mCf7oSc3CnouSmtZz4wmMj1ETDUK5B13rW6mjuNJZq5hXCiVDFdGWdXZKv+k5hclY7+W1ULaMY11gWELnM6y3ZWO2WftkLh6mdM//meskuhuOwI/HaAkYy6J62y3xHnbU75RW/z6wSmA0wuv8QBiC5e7vtLqUcLrlPzgb37jT7e7b/eb9Jea6tYlpQnw012H6B179H0ZD5IGfKMFszcGXazcTygnEPrNwh3Zs7RI9HfUIv2HEP91J55S5cPcfa4pZvtdgcRlqPiSXLxRPt8bzBTmY7jX9T91Kj+5jeC82wxe+cNlI2lJp30ZXYXUhabhpYVqAkBZsdgmNox3VBzXiDbqYe3S/jwgjzHeDtQj3S7UxvlDG7osBcCSfzfQ/VuAM1xKKIfI5aH0HORuXeadVlEolafg0AAhsHH59PWG5PpD/xkCq1c3wMzFMuu7I1gzeAddX8ceUBHT23nLJPUSz2CTRgPIvlte8trGk76mORPJuiXZ8ifz3l4YFoPq3qlsv0yy9Lxv83Ivzf8w== X-Microsoft-Exchange-Diagnostics: 1; DB6PR03MB3093; 5:+A8t3mKypKAGZRe3qT9TQ6UnI2UJmdhA7WF4ScsALWsANFCw32YaG4IUgprSlc7+drAQP+jTCmNN5KjHgzxvdcdXDbi/mjr0fYt373m19DfRy/rXmX82YNWrS0zIWXZZOWGZT/be0GKEYq+G2POnx1nCyUCOIaR4DN08uX/kyZh0owGliMo9ba1m1IGgm6C4635FvI/tgeonahpal2dGf34n+jBYX6V4qi4bZwPmxgM+18khHbAsoAKYKNte9BvS87Ec5KcLtzLuz3VLnaIyQqhx9whYcMAaKXAJUrd30FhQ2TRG/bxyyI10EHGroUiMTO+W1WzV8rgSM/pq2gG3yLFR3T+APmI41kFspzXZk7gZUK8ElrVkBBEHkvts0ndF4xVOHRQIfKgaDIlIt8ZT8IY2O8GokBzxS5ASB6952pOhVSnaFHfqB4gsoTW+3uWt6V4byK/ij2OEbgebKOKDi9tr+nYPwmJMZr50ffXfVyAzLAv57nFXxQ9C72osnyYt; 24:1hFb8SJ7R1PmcszTtMJeIlMizIyQx0TS0ea02IZCKAiDCu7h+1hsm4PnwwzUQyrdWFDtgD8Suld8Cz3Xy59K8GocKa9jtJeZmaCB8sBLGOM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR03MB3093; 7:okmH6rOCad+6KHmVC18ZWnRQQu3mSDLSS7vUNeEVbvG0IZ5obZVhDukgtHOhstZNu4Bew5BRDKrQ2RK2PtNQ+R2xlEJgQAVHShqE7tA0RyxbAEsx3+2D5XTyFvxA8zbkNIkfmxuWXUEYmyrv4V6BtaCyhsm2cFsoFjWB7/rsoAZTNzAQ8jPPxwpgc7WdpfwbvYjqIv4M6F8zX0M81xKus56KWLWBCcF+rEVwVlm3+RriOT0b14TAFUH4WzrwK2GWmeMttsJ2mi53QEyqV23q8aJbSWH/5IEGZ6y/OfEs2tBh06pTDbfwmQKfO1eFHuWfXqYshI5yqxY38r6TRBVnUA== X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 14:11:24.1348 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR03MB3093 X-Mailman-Approved-At: Wed, 14 Jun 2017 14:38:53 +0000 Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk Subject: [Xen-devel] [PATCH 1/2] arm: smccc: handle SMCs/HVCs according to 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 SMCCC (SMC Call Convention) describes how to handle both HVCs and SMCs. SMCCC states that both HVC and SMC are valid conduits to call to a different firmware functions. Thus, for example PSCI calls can be made both by SMC or HVC. Also SMCCC defines function number coding for such calls. Besides functional calls there are query calls, which allows underling OS determine version, UID and number of functions provided by service provider. This patch adds new file `smccc.c`, which handles both generic SMCs and HVC according to SMC. At this moment it implements only one service: Standard Hypervisor Service. Standard Hypervisor Service only supports query calls, so caller can ask about hypervisor UID and determine that it is XEN running. This change allows more generic handling for SMCs and HVCs and it can be easily extended to support new services and functions. Signed-off-by: Volodymyr Babchuk Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Oleksandr Tyshchenko --- xen/arch/arm/Makefile | 1 + xen/arch/arm/smccc.c | 96 +++++++++++++++++++++++++++++++++++++++++++++ xen/arch/arm/traps.c | 10 ++++- xen/include/asm-arm/smccc.h | 89 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 194 insertions(+), 2 deletions(-) create mode 100644 xen/arch/arm/smccc.c create mode 100644 xen/include/asm-arm/smccc.h diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 49e1fb2..b8728cf 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -39,6 +39,7 @@ obj-y += psci.o obj-y += setup.o obj-y += shutdown.o obj-y += smc.o +obj-y += smccc.o obj-y += smp.o obj-y += smpboot.o obj-y += sysctl.o diff --git a/xen/arch/arm/smccc.c b/xen/arch/arm/smccc.c new file mode 100644 index 0000000..5d10964 --- /dev/null +++ b/xen/arch/arm/smccc.c @@ -0,0 +1,96 @@ +/* + * xen/arch/arm/smccc.c + * + * Generic handler for SMC and HVC calls according to + * ARM SMC callling convention + * + * 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 +#include +#include +/* Need to include xen/sched.h before asm/domain.h or it breaks build*/ +#include +#include +#include +#include +#include +#include +#include + +#define XEN_SMCCC_UID ARM_SMCCC_UID(0xa71812dc, 0xc698, 0x4369, \ + 0x9a, 0xcf, 0x79, 0xd1, \ + 0x8d, 0xde, 0xe6, 0x67) + +/* + * We can't use XEN version here: + * Major revision should change every time SMC/HVC function is removed. + * Minor revision should change every time SMC/HVC function is added. + * So, it is SMCCC protocol revision code, not XEN version + */ +#define XEN_SMCCC_MAJOR_REVISION 0 +#define XEN_SMCCC_MINOR_REVISION 1 +#define XEN_SMCCC_FUNCTION_COUNT 3 + +/* SMCCC interface for hypervisor. Tell about self */ +static bool handle_hypervisor(struct cpu_user_regs *regs, const union hsr hsr) +{ + switch ( ARM_SMCCC_FUNC_NUM(get_user_reg(regs, 0)) ) + { + case ARM_SMCCC_FUNC_CALL_COUNT: + set_user_reg(regs, 0, XEN_SMCCC_FUNCTION_COUNT); + return true; + case ARM_SMCCC_FUNC_CALL_UID: + set_user_reg(regs, 0, XEN_SMCCC_UID.a[0]); + set_user_reg(regs, 1, XEN_SMCCC_UID.a[1]); + set_user_reg(regs, 2, XEN_SMCCC_UID.a[2]); + set_user_reg(regs, 3, XEN_SMCCC_UID.a[3]); + return true; + case ARM_SMCCC_FUNC_CALL_REVISION: + set_user_reg(regs, 0, XEN_SMCCC_MAJOR_REVISION); + set_user_reg(regs, 1, XEN_SMCCC_MINOR_REVISION); + return true; + } + return false; +} + +/** + * smccc_handle_call() - handle SMC/HVC call according to ARM SMCCC + */ +void smccc_handle_call(struct cpu_user_regs *regs, const union hsr hsr) +{ + bool handled = false; + + switch ( ARM_SMCCC_OWNER_NUM(get_user_reg(regs, 0)) ) + { + case ARM_SMCCC_OWNER_HYPERVISOR: + handled = handle_hypervisor(regs, hsr); + break; + } + + if ( !handled ) + { + printk("Uhandled SMC/HVC: %08"PRIregister"\n", get_user_reg(regs, 0)); + /* Inform caller that function is not supported */ + set_user_reg(regs, 0, ARM_SMCCC_ERR_UNKNOWN_FUNCTION); + } +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 6cf9ee7..2d0b058 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "decode.h" #include "vtimer.h" @@ -2781,11 +2782,16 @@ static void do_trap_smc(struct cpu_user_regs *regs, const union hsr hsr) { int rc = 0; + /* Let monitor to handle the call */ if ( current->domain->arch.monitor.privileged_call_enabled ) rc = monitor_smc(); - if ( rc != 1 ) - inject_undef_exception(regs, hsr); + if ( rc == 1 ) + return; + + /* Use standard routines to handle the call */ + smccc_handle_call(regs, hsr); + advance_pc(regs, hsr); } static void enter_hypervisor_head(struct cpu_user_regs *regs) diff --git a/xen/include/asm-arm/smccc.h b/xen/include/asm-arm/smccc.h new file mode 100644 index 0000000..9342d5e --- /dev/null +++ b/xen/include/asm-arm/smccc.h @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, EPAM Systems + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * 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. + * + */ +#ifndef __ASM_ARM_SMCCC_H_ +#define __ASM_ARM_SMCCC_H_ + +#include + +/* + * This file provides common defines for ARM SMC Calling Convention as + * specified in + * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html + */ + +#define ARM_SMCCC_STD_CALL 0 +#define ARM_SMCCC_FAST_CALL 1 +#define ARM_SMCCC_TYPE_SHIFT 31 + +#define ARM_SMCCC_SMC_32 0 +#define ARM_SMCCC_SMC_64 1 +#define ARM_SMCCC_CALL_CONV_SHIFT 30 + +#define ARM_SMCCC_OWNER_MASK 0x3F +#define ARM_SMCCC_OWNER_SHIFT 24 + +#define ARM_SMCCC_FUNC_MASK 0xFFFF + +#define ARM_SMCCC_IS_FAST_CALL(smc_val) \ + ((smc_val) & (ARM_SMCCC_FAST_CALL << ARM_SMCCC_TYPE_SHIFT)) +#define ARM_SMCCC_IS_64(smc_val) \ + ((smc_val) & (ARM_SMCCC_SMC_64 << ARM_SMCCC_CALL_CONV_SHIFT)) +#define ARM_SMCCC_FUNC_NUM(smc_val) ((smc_val) & ARM_SMCCC_FUNC_MASK) +#define ARM_SMCCC_OWNER_NUM(smc_val) \ + (((smc_val) >> ARM_SMCCC_OWNER_SHIFT) & ARM_SMCCC_OWNER_MASK) + +#define ARM_SMCCC_CALL_VAL(type, calling_convention, owner, func_num) \ + (((type) << ARM_SMCCC_TYPE_SHIFT) | \ + ((calling_convention) << ARM_SMCCC_CALL_CONV_SHIFT) | \ + (((owner) & ARM_SMCCC_OWNER_MASK) << ARM_SMCCC_OWNER_SHIFT) | \ + ((func_num) & ARM_SMCCC_FUNC_MASK)) + +#define ARM_SMCCC_OWNER_ARCH 0 +#define ARM_SMCCC_OWNER_CPU 1 +#define ARM_SMCCC_OWNER_SIP 2 +#define ARM_SMCCC_OWNER_OEM 3 +#define ARM_SMCCC_OWNER_STANDARD 4 +#define ARM_SMCCC_OWNER_HYPERVISOR 5 +#define ARM_SMCCC_OWNER_TRUSTED_APP 48 +#define ARM_SMCCC_OWNER_TRUSTED_APP_END 49 +#define ARM_SMCCC_OWNER_TRUSTED_OS 50 +#define ARM_SMCCC_OWNER_TRUSTED_OS_END 63 + +#define ARM_SMCCC_FUNC_CALL_COUNT 0xFF00 +#define ARM_SMCCC_FUNC_CALL_UID 0xFF01 +#define ARM_SMCCC_FUNC_CALL_REVISION 0xFF03 + +#define ARM_SMCCC_ERR_UNKNOWN_FUNCTION (-1) + +typedef struct { + uint32_t a[4]; +} arm_smccc_uid; + +#define ARM_SMCCC_UID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ + ((arm_smccc_uid) {{(a), ((b) << 16 | (c) ), \ + ((d0) << 24 | (d1) << 16 | (d2) << 8 | (d3) << 0), \ + ((d4) << 24 | (d5) << 16 | (d6) << 8 | (d7) << 0)}}) + +void smccc_handle_call(struct cpu_user_regs *regs, const union hsr hsr); + +#endif + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */