Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030245AbcLVX2R (ORCPT ); Thu, 22 Dec 2016 18:28:17 -0500 Received: from mail-db5eur01on0069.outbound.protection.outlook.com ([104.47.2.69]:33701 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S941731AbcLVX2O (ORCPT ); Thu, 22 Dec 2016 18:28:14 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@mellanox.com; Subject: Re: Questions on the task isolation patches To: Paolo Bonzini , yunhong jiang References: <20161201142812.369f23f8@jnakajim-build> <5dd4cbf7-d0c0-074a-c5bc-e2e09ec3dc75@mellanox.com> <20161206134355.193c752b@jnakajim-build> <050e5bb5-b5d3-86a4-f7ff-5f633a4bd2bc@redhat.com> CC: "linux-kernel@vger.kernel.org" From: Chris Metcalf Message-ID: <65187421-39c8-617f-56bd-d6bd69dfbaee@mellanox.com> Date: Thu, 22 Dec 2016 15:56:57 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <050e5bb5-b5d3-86a4-f7ff-5f633a4bd2bc@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: MWHPR13CA0022.namprd13.prod.outlook.com (10.169.208.32) To DB6PR0501MB2759.eurprd05.prod.outlook.com (10.172.226.11) X-MS-Office365-Filtering-Correlation-Id: 50941695-76bb-4a13-1b9a-08d42aad1a1d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB6PR0501MB2759; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;3:hMECJJnXRbljarmKmVriH+XmZLPmzL2x5xB9YKaFweX13bCONfyctfv0VkpZLd0CnvXB3dgCIlp2L0C2gZ9z1zWlAb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WfDlbQUt4T+K/o//R3+cxXahoGoyMoXKgUfZinQi9zdCY0YeaR+7QVWG7fwYSkqZh7wWCFVDLYmwkk1IMaN3pWxMxcr51ZLNDx++Xmo6XCRYr1oWiB0vHcuPSOPrYnFTF57Lm9bVev8+eISJK2SRQPdfEcPpv6ceLytRsgQF+EPMHEVQ/wTcN+9nBp2YGWUj+QsIb8F/IXtwhcNePL8myPTUeSbDUwBGjLtbymwg0/35n4xBf1GTHuQErs/HO3O+6IfYGE6rbJY/yojYILMhT2Qvj7qXX5uM3XCqrCtP/F0s6MzaicHk8SxhHJqUFXRVF9UzCk3XkQLAAHZdVfacB8Ol59WL2qUxRowZmAEUxjkMiUL1r/Czv0uq1W90FdSVSeZ2HZSpBNWRGVdjq9rJMisXHUC0ouFn7UwnZbxU9tOYVsD1w7wWfLNlqgDHGKoVF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(171992500451332); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148);SRVR:DB6PR0501MB2759;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0501MB2759; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;4:Qa2pw9VHFA9qh4JJhbRSP1oeQZ8yIH7ffb+m6Fgrzde4lyRIZbj3URTlTdVCKwHr1ieVq31F9A+l1hwpbVBZ/wbzoJmaiyeN7g9bGY7TydqAqMTIQjheVkKH+PN14iK4s8qN8bareYRf0oiKBHfbyVETH4Fz0Z4og/ew0Lf3BEDZWva3pBj6Ii4/lB0vlAn2dLjCaqoYyqC+Z3/n3GiqxZUJGM4o2utqZLo90Ru4Bi4Pg7a3xkSNMhSgA9SESRmC4SzYjkHNumr29Io8IxOO4A92QeZtDZ3bIONU77qui9YZpqeOjmlKP9v62Ox8MNFQkRw0zC+KgKWF0xEBAYRF5uEbJfUzqpxG80hhO7c0PyyGxewkgDf3GwzFRV5yxIGZ3yojz5RS710QlB57c7kP6G/1NE4JXvCNrfZiA+v+HupmkzV7g+iwDgxd6A4rfPkCV85qnpC0GM+tB08txvrNvdqG5uZ9u/nyQXeZCyRtpuFkKCKBDahsG9mxlAPYDOpB8YC1DCIuVHUe9lonvzv2lmvv6So3EhpXll/PNvKVcWYu/ztCnm6UDOGlrf134Cat+Q4v0aKHx0YiIYzj+XY9bvwzuo/vJ+32RGcvrKqQ6MXmxTD42+JD9XfoaHHO2hMPFIayrfQIastRQpRHAAaUN8Ob+AtQ0b3DSPHdvplYLEE= X-Forefront-PRVS: 01644DCF4A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(39840400002)(39450400003)(39860400002)(39850400002)(39410400002)(51884002)(377454003)(24454002)(51444003)(199003)(189002)(33646002)(25786008)(76176999)(47776003)(189998001)(305945005)(31686004)(50986999)(65806001)(65956001)(66066001)(93886004)(230700001)(81166006)(8676002)(101416001)(42186005)(81156014)(54356999)(50466002)(2906002)(5001770100001)(4001350100001)(7736002)(97736004)(68736007)(106356001)(86362001)(83506001)(2950100002)(31696002)(6666003)(105586002)(36756003)(23746002)(64126003)(38730400001)(90366009)(3846002)(6486002)(6116002)(65826007)(77096006)(4326007)(229853002)(92566002)(5660300001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0501MB2759;H:[10.15.7.185];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB6PR0501MB2759;23:TQp5S1Ir0g+ZSSjSnjgyXmmwt+jN91Bl0Ri?= =?Windows-1252?Q?IUt0IWT0HWDJzyR+Jpc+Vm/zLQFworrMS4BLYtY11QftSYGgK/M0AJ+g?= =?Windows-1252?Q?xTNS7AX4XE5Kf351c3sNHeovcENlxp4h9+XtYI+hy9NZgEfuKl5us0Vl?= =?Windows-1252?Q?H+MfsGrXTa/rGQJVhTfUAWyJ9DMV9v68sV3r5MwZL2sDQ1Y4hYhMo0S5?= =?Windows-1252?Q?KBgxRi6ZUspXfw1yGTCUi8VK7T5rdVFNJZDqHb1MEXU6UuT0mxKdv1z/?= =?Windows-1252?Q?mZj3gjQov8rML4TqGr3zpCbESgFe8UwjrHd/kLuJHn3sKjIFo/2ZxI5O?= =?Windows-1252?Q?M/3GKGicwSs+NE44EWGBbJcJRVywNPEWF8i0HiCX7abYavchFV3a7Uya?= =?Windows-1252?Q?cBPU5i6ixm8SBe8hT9KlowUpQck64ykjejO/fKdPsEgd08rm1kxxDKFR?= =?Windows-1252?Q?WLRxb2QjRWqhcNkf1+NTSiYZxD0uTTAJms8DNCd4sA/ht4MgyVBUvGiF?= =?Windows-1252?Q?Upg7h5ZRNN0SAxeAZOXEVOEeuRYvRkvSe1e4ezKJTy17Dy2l+1cm1Y1d?= =?Windows-1252?Q?8K4rnP0P7X6wHXbb35rDdcAptbJE4Wp5tV6Yg0HiBH0AmJKJBTSAXffZ?= =?Windows-1252?Q?XVSsG6IOSVuTqyAJ7o5KVjwZjUVKOTv2VyUU0ljasYxAvjiag0C5MS0m?= =?Windows-1252?Q?nu3VtdGluKsa9xAPgDF4CAAmnKOMNXXMe6Bzt6ycyJpweN6StGk/wiGV?= =?Windows-1252?Q?2vI9YlwBMvV82kwF1FOeW9Jky8GSRjrGhR02Hd2gQ7NjXuEjD/cb7+Pg?= =?Windows-1252?Q?f+o+ePKKNKjddmsdzyqieZhwtf4ZI5M/9XzyJxjrIHuXOXb62trDMqpj?= =?Windows-1252?Q?XB/+GYBjkua8qK7xVfNGNUp6VQdq/uFda6XXdNrcclH0MfkzKXl5uKua?= =?Windows-1252?Q?tG2FQ1ouz2OlbAEDcGnJ07tL65zZRge6SC74EE82hDNMN2mIxP9DVhqj?= =?Windows-1252?Q?E/CRp+zyOlsXAuU3uPR8fFRiK7FGLyFLos9diM6xxYj5/xOWU59+HK+p?= =?Windows-1252?Q?BO25sPnnBV0376jhsJVED3neHA9CJ1uEVB2/0mW/jFQz93aVltE7PxHl?= =?Windows-1252?Q?dTsx8f5qcVdDu84WpSxxV7ZeMx9CTjqx5S/uY76ywQizWZ45n6s12OKI?= =?Windows-1252?Q?Kf1jYQV/3JhljesXz5GsvPXX66ilKAQwVthZEBnUsLWgH+f5kjj2Mc2n?= =?Windows-1252?Q?u0VH0qmK/nakFTb22sDSQpEd59dQhAL2ab30UtvAfc+lhIisoEjP3YIJ?= =?Windows-1252?Q?3X4J3d98JKaXid6hudA5ID1T8WB2vSKRRHhhXA6rT9divuYFOWC0uXFQ?= =?Windows-1252?Q?hStunIft+B3fYTxJhP03bzOtp3f22w8bFE/YiJsGKnbyLOqBn/yWb6cm?= =?Windows-1252?Q?twwBD+7hab9tvgMfuQK32oiNw+lNs4bXfs/IpaVpfAaUd3wcJPinZyuy?= =?Windows-1252?Q?8XMyN1XZd4m3E+IHN69WHdhO3ncyS0nRMSPoAhgB2er2Zld5UQsAnhRn?= =?Windows-1252?Q?14t/mRH5oQnuWS6DP6TxUPDoKrHr04GsBSQBy7pFgRtQwTeCN5sieyPZ?= =?Windows-1252?Q?qZ335J+MQNLprD1sEvTBj1YacFjQ3vCUOrjxgrUCa8P8a?= X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;6:R/qZ737zjGpMU+FtUX5KExjWkQK3qz1j5XR0AqgqdlY6qjlyt6QsdD9wYYTy97aPwmHbt9ba2rH9aaDKmUZ92NVYzAqZfjIMXNNxmi+n+otn97+5EYxx2nOrpfNKZstvo3BQACCyQoU3TUIjPnMl6O8Z1avEN5HABPbkEYc5ncYOJsa7rFFfGLcqkwRxhnEIBC/yR/DKXe0OZOy0zCRW0SDyX+IIyMdzFKXGfBQjPXQtT5VWSf4M6Qb/66tCGjrdCV7pjrpkiYQGwv7GKVS3d3Wq8keUJtYEIrICZdLFsINbPUvMRjAi3eruKo03C3uOBo7JNVzcS/w0Ai5bEEA1a48eQsXiSCYb9nOD2t+krFtSC5a+dLQPfyXfD9nsoWbos4kof0LTxCQCJvYdfc20cI2fnmaPYHnJJj6axSiW9aCH/qNbi9+Lv+NaSKT+vLkzgIWLwrb73hqdy9hHjXah4g==;5:KhstX5isyvywuYT1gxlpnkRBXpMxQgbpes4iZjZtxY3cSaj4Tz7ces5k5nzSZnUbN8a+Fmtwp8+7SbhRvqlmeYHodDiTYV2sYEerregX+iQVOt8vMN4NYBzCjX5IayXCK5d+z72ajw5t3UEbtDDN7A==;24:Qd2Oy7vSK1qFUiFqWFIg5K67VItdJVDPap+VvMZQEzlVaeBR6TGw9+7K+8AGjuMYVYm+xAehBJsiraYUf2Z9vAyScwtdDj994fWWlOKAJnI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0501MB2759;7:rruTn0PAWP9ZlCVm10Zev0NNBzW9V3Iy3tOEaD0jq/Q2CVFAml2hk7r7uCffoT/04NjNtixt2jlC08gV8d9UZoEcNZJY1dLzd/3lcMOvF/+C+i8k3TPHLy6cVAvnpZ0ZlYIbHjs//P8OFahpEdbUM6DXiXARx0ah0mbYpgboxHSfpPPBksURXCseRFmzFLTX2rnxUrPLpWEmRNsl4e1qRagRARvQtkavPIxzNslWzKNFcnz6dh5z1HMGkeUZa8cFveuCphEdHBOaTICTzm4DCZvFw6mAr0dzm6L0P6hW8QmyHr7gz/9Us+pGQEeu2dQnJRsL4+4AY1T5hQ7JC37snydQ0Ww9e2RDl0s/pv1zaab9aCfMcpwOO7vhHIEi+KK17N8aHPdKbqGxZ0ihT/dv3X/rz5HEvtmFSCwhQCfyU2IH07HKbRNL9Ul47ifuCcMNwXdVQYY9CyzH73hX2H9d6Q== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2016 20:57:11.0717 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2759 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 23 On 12/20/2016 4:27 AM, Paolo Bonzini wrote: > On 16/12/2016 22:00, Chris Metcalf wrote: >> Sorry, I think I wasn't clear. Normally when you are running task >> isolated and you enter the kernel, you will get a fatal signal. The >> exception is if you call prctl itself (or exit), the kernel tolerates >> it without a signal, since obviously that's how you need to cleanly >> tell the kernel you are done with task isolation. > Running in a guest is pretty much the same as running in userspace. > Would it be possible to exclude the KVM_RUN ioctl as well? QEMU would > still have to run prctl when a CPU goes to sleep, and KVM_RUN would have > to enable/disable isolated mode when a VM executes HLT (which should > never happen anyway in NFV scenarios). I think that probably makes sense. The flow would be that qemu executes first the prctl() for task isolation, then the KVM_RUN ioctl. We obviously can't do it in the other order, so we'd need to make task isolation tolerate KVM_RUN. I won't try to do it for my next patch series (based on 4.10) though, since I'd like to get the basic support upstreamed before trying to extend it. -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com