From patchwork Fri Jul 7 14:21:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9830571 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 48F2C60361 for ; Fri, 7 Jul 2017 14:22:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21FD428632 for ; Fri, 7 Jul 2017 14:22:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1676B28697; Fri, 7 Jul 2017 14:22:50 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2219428632 for ; Fri, 7 Jul 2017 14:22:48 +0000 (UTC) Received: from localhost ([::1]:56808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTU9f-0007gb-Ga for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jul 2017 10:22:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTU90-0007gJ-99 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 10:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTU8v-000497-7d for qemu-devel@nongnu.org; Fri, 07 Jul 2017 10:22:06 -0400 Received: from mail-db5eur01on0097.outbound.protection.outlook.com ([104.47.2.97]:11364 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTU8u-00047K-Cy for qemu-devel@nongnu.org; Fri, 07 Jul 2017 10:22:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3uJhxSwxWXKPCqhzASzpa+R0GLuxxFKlIlZct9FH7dY=; b=FZItDGQAF8hHrCu/qeUe/me7oa1ekujlgkeLVaBPrY1Yk81Zhhr6Vw42Jd1JpqItmwirY6VXL+e+CSR3EuHjFqN+vm55WKpkIS5vhhfAbOxOxgoUHQUv0ewtMCe3LD0je8CU8Z9XheXNVdUxGJ0d/EimrHijL944KQavP3kf9qU= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.6) by VI1PR0802MB2558.eurprd08.prod.outlook.com (2603:10a6:800:ae::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Fri, 7 Jul 2017 14:21:54 +0000 From: Pavel Butsykin To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 17:21:38 +0300 Message-Id: <20170707142138.411-1-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM5PR0402CA0022.eurprd04.prod.outlook.com (2603:10a6:203:90::32) To VI1PR0802MB2558.eurprd08.prod.outlook.com (2603:10a6:800:ae::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 897b366f-ecfe-4e58-61f2-08d4c5438531 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR0802MB2558; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2558; 3:cFaYoJn2YGZbV+7k6jnbpyTe2LcyyddChNuyWtiInLjOsieTYVijvEIvGXUb0ak552bfXhMThx/bhM/4XnrFDHSvC/luWXTDSbU18V8vRtJP/M6n+S8R7F8fIW7YWkZnxQAWw4a1zcwcVgte3yPx23sLl4+nWQ9JF3tTP5Hby/M+fD0r7Aoy4hPp9aGVo6KJjVc+/m64VB08SKRSpeGTpbHFnE2IBvPknLsab3DJnYdWn3Wk5UrZC+tDSXH5r4W5kgH4/ISfP9eyiluzwKvgWfX6+zzfvl3bMoFh347hzD0JUFOp4tNbh38/QQOGgL0T2lwHUZnUQRyI/rGu7mrwIngj01ZygPRJRRKamhxoB5yyHN49QNbxfXCh7Wo/SKYTeaG5XgSC9B6aYVVmOFSi1MLgO1JRbCPIUAllHMSg9WFd2HB2D/8jWhiNxniPeLAIXGSZWhJk6zJqZSMeM9qH64uVIGjqrtBVQjLy/34ZMbag/02l6OU6KoLHUGB7MzDDTkbHkwak3ulGfW82HH8GRsSKO4MyjXt9mas80o6lW8psyM6MIZzAZGa/KYrw1eJ/tlLB12rzVYj7aSSepAFlO4VdsgETh6VbEIm+3I8rk+q8WcP/Q7EK/OiWt7XbGXtg9XPBbS7VCRU/NPMn6NSSn4FopsPNBt454E2baIO1ZbhX0OWAQK75KL61/8aIHXLCEPxhz4WEmOfNB1X1hNx6EizWZ3ssiWFzI3wm61/vW55UA4myUw1mSk0Jkx6Zgn5r X-MS-TrafficTypeDiagnostic: VI1PR0802MB2558: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2558; 25:zFgIRDGYLn9VZckv63j/z6XjBTCnltkZ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AOkE1f0xhaletvxr+3F9BLznRWYC24BaumN8DW0O2+cSN5Brqj6YcJQEgwjhsAiuKuKdaZer/i7CtZihAowx/IZrB7eGNEFVCPX+CblswXz8kjzvUyNbIeqjejYsxuC9l/eggQaFnrZRTAq0QooJ+CzO0yg5OkdBcveoBfckpnxm1/71P6APL3DpFoeTlXCWW5jqJHBF80Zhq/Y98fNSYuD7xiG9dNH70ZziInpC00pB/qYOTikOA0JJ6r1aCcgNL0co/oHcld0zccqMGboe7bn6GpNySHQiWbgEsLLA7LYpNSkkBVCBVUzpOVI2I+ZH+RlV5wVJIEX7rCkusJP7gxZKEuVvw9dz8rVgnZh4kwQcOuUI44mIQSwhAFm4lD/bQNT15pCapXI252tqX4OUIgZw/CvDDL96vVoz6d4BuxRJM3Hs4/fPNARO72cvHs8ByoIPsRUZOxoOB9s4m48WzSGVIho3Gq4kLkkYxsV4Hcf7It25hgSKX3PLL4nealg9aloD+Csf4HNwxFwx66MVL0UOKCkPNVTsBpGsbGY+FYWmu/7T6kdao= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2558; 20:NUnWpCuV5VN/IXsMdUhz4RrkGgkBe00rm+bGgeSX3EXc8fW242BG+V9C65QxtvXkB4CA3q8EfVFLPxonwnNyU2qmnUEa6lcCpuF3yAhSetq3wMWu/qGhl0F19O3T6RBnd/HCbXGj7wPCgiMsRrygr1g+WyKhWRG3C8/bQMez0mZnUTX1ZWsKN20K9QE+HaiSu7/PYMKYbfHTefwZ27yplzTVGrWUBXiTpRM5uLs02qQYtSM9uP90FO4fZxPHdT5zQoylQdSUOdQOu5rKKdM7dGg9n+tNJG7oFKlNrqu2B4gOC2/FKdP8eYI3d79kQ1evfSDXlVqVXOJ5cyRs9Idtgf2t4knfW+2QKYpnL9hUrHAmtlFkd8vk9doMWg0bE1IrCyWXO2QsCL0wY+laUUbmZ5e7BapdHEEhGN6bIDwC8Lc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(2017060910064)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0802MB2558; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0802MB2558; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0802MB2558; 4:MnOYxgLwMJRqFCfQIJ31ImZhUfO+mVa8eZu+1IPv?= =?us-ascii?Q?v40gc7kXq2MWVe0OZ9G1nRt9s2obBa2xRKvuy9O+o3tPt2zO/rFSRfq/cE8N?= =?us-ascii?Q?LNaW+FSBKcO4QBIuVCM6Z5onT3achkxXQdC4EftU1SK8LwzRLgWnC77cE3CR?= =?us-ascii?Q?jAUUA4R/Q2g+0A/imY5pcG3mikTBrF6duAM3zobBJoMHP7R2JRWPUW/gzKb1?= =?us-ascii?Q?5LhSUy1qrMZYvQHuRI9fGEbQd8uOJQY7JDYf0kKi8+URMJXuF/vKCfZaS/eU?= =?us-ascii?Q?ZTeqoIb0bFlXPUsnPr2z6aXpJTMv8R+3zDHNFsf7VLkQpTipOE7cn6E9Q2ti?= =?us-ascii?Q?yrZN5vUcYNtovVuTl5ymYT39ULZl081q6W6pz5XjgwUUmBS2S8UACfiiTfOU?= =?us-ascii?Q?wgqSagEIiUjWzmHIc0cwy4e4CpypUc5AGgsTD6o9p5ikLk4tanEpu/aJGHiG?= =?us-ascii?Q?9pXbihPDTU/c4Shb+t3I3YGYIK7XnWigDwegxYWCvwSOqI1daFTlzTn0JLij?= =?us-ascii?Q?Gxm2xxaTx7IJTic5pCXsg3AT9BEc/sPkK3vzdnHOwwjsnOn2HqxevhGjPAHY?= =?us-ascii?Q?SSHHToMK2+6/On8QQo0JRG/2/cMoQIdf+ES/qmlXzSmINctPqKExaxMQHihU?= =?us-ascii?Q?6C9hkEYPgH8T4C8KYQ29M9YYfH8bwgEkShMFcjBFOEMXSCbowEymP2Rl9JPg?= =?us-ascii?Q?1II0saU0CpPLPJgbOtz4x+DivHnWhD7Jvyx94S4c5WKpcL885RGGV8eJY8Fj?= =?us-ascii?Q?uZUbBLhU+FpSXDc/849vbsewnz+qIBC0eaY814FyN7jwbU3SEoxFmi/t0T9n?= =?us-ascii?Q?CSzcPwYb4gNRWtAavBr3jBZxdQIc+nKmXVwl+m2T10wC8xnab81QWQWn65sD?= =?us-ascii?Q?Wm9w40Qkbb/rj0NBO3ZpzSUhrCHdufIyRbGj/7iUOe9yMKSbVJXoVLYI5cQ6?= =?us-ascii?Q?XHqMyeCgxy2nyuJZ8SNh2h97xra7Ul2OOyE/bizB2fdZbrgWNmBiOYlWDpZL?= =?us-ascii?Q?6vEKIvzhLTj6ScSThq/1NekcKYMRK6gJKuHo2D1eGWgR2ffZgzSrFY1J2f6H?= =?us-ascii?Q?VE+p9Zj1reiD6cVyqu/TXBO6/MOT+/yAvUe4ozysUXw6g+8oy11w0RZNv2jk?= =?us-ascii?Q?HBJR6UcNQyXPiqw76eRCDf/PTsUGNSHGEsHk8ZRTvWOlShHdn7UopzuJvaUc?= =?us-ascii?Q?Hanj9gaErOWvA9RG/NusYeBX19jAaqvvr7OrGZrxcRbeLRsQ6WlCQ+x7uA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0361212EA8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39830400002)(39410400002)(39400400002)(39450400003)(6506006)(66066001)(53936002)(2906002)(7736002)(48376002)(2361001)(305945005)(189998001)(33646002)(53416004)(5660300001)(50466002)(50986999)(47776003)(575784001)(86362001)(6916009)(36756003)(81166006)(6486002)(25786009)(50226002)(8676002)(5003940100001)(2351001)(1076002)(42186005)(478600001)(6116002)(4326008)(107886003)(38730400002)(110136004)(6666003)(6512007)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0802MB2558; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0802MB2558; 23:e28LUG35SfDbfHQbm5xEehUwpDWOip8+QsWm/kt?= =?us-ascii?Q?9BhysSypKf1QxXgY+pvAklow4ZUeXxX7FkSnDObxLgVXh1bN8wMIZVCGnSJH?= =?us-ascii?Q?wDBnxtYRDoSQCyiZIXzZeGqm4Gq90OWgVmeuSpDEhMUukCRJlLbmxOQeprwS?= =?us-ascii?Q?jImbXA/ZnjTWRrS8EYH1O+WyJlgbBd0qHr5VbeFPly3uyg4DeX6h0qkBgWcO?= =?us-ascii?Q?WJwqnnC9JKWqWKpQuXGb72PZq60/pkBta6Vzoogtm/oNw23TUkYCctf9ngHU?= =?us-ascii?Q?/WmvbX39HXm2P9fbCe2aVHsqAtHP+3CfidGbjQnMCJg5/Tai5U15u93H3kBc?= =?us-ascii?Q?cBKfXluV/99dqh1pCiAxiGrdL8C+MURLe4FaSIKY5bB1UoYBI6aMO3wY2Qro?= =?us-ascii?Q?D0kXiV4AucpNcUNjC9/3Eg/OsPVlxspOdah6vf+DW5tV6iddVkrP0EcfANtO?= =?us-ascii?Q?q0gvV5ND9y6//KR5+rHTBems9ZcfQz3VLMDyD3//JL8SeeMmXyb/R1HAoPo3?= =?us-ascii?Q?WYu6yFvXox6e+jVNK9FtQI12e8bqzCmKSP/vcchNQCB4D9qtqRLdvqabjk/h?= =?us-ascii?Q?iOyOrTdPS2nsZSKueuNTSwjb9tnrxwDpQvAuFhb6lekQyNt6hkeWsDfAbKck?= =?us-ascii?Q?7rATuPBt/2yHCBj02Xr0E83x7JG5Q5kYuc/woUcfFCCC5JJupMmW/anD3DaQ?= =?us-ascii?Q?INHk7Is3vByxwIEIQE/QNKcpZWAN0qDkyim+qHN01y64GSnQsXiJ5mhYNH/J?= =?us-ascii?Q?jn0V0W2GCTicD7yPPrMXw1V/CCyinLSIehr66NDZhwEdo41bkUawa5tHp632?= =?us-ascii?Q?tcvFdWCEr6r8/q1NwHWSZTaCsPbyXKxVbnLC7W+QDaUiu2Hm6d1nvL14G5z3?= =?us-ascii?Q?Mrnt6RYszpKGF7hrs0SF1twU6g51dITmjKyj1Ob01/dEV3xd8LJ0P8uDqNO2?= =?us-ascii?Q?z2pdb9rLhU2vPaLRraVZmKoKclOowWCafjL1U6M5ThtNt9nJ0B57ZF0VbEwy?= =?us-ascii?Q?dXizuWdBAWyppzYCIcbdm1G7NqNB4/LeJ7wvZoGKbRvttyEc8VKSvMNvquHi?= =?us-ascii?Q?km6G+xkBga1GEV17ud/uqDI+jYxrz?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0802MB2558; 6:h0Sl1Eb4rQujUJN0vx+f4SJuWp6YBw0mfZfre1Pb?= =?us-ascii?Q?4kho8dq2cpGdM++b2u03dx1SYWs0zWUAuOc2jNBICD+t0Mo+kDqh74dOf2Y9?= =?us-ascii?Q?px9axeoDfxZCfwrNjNkEe1o5ivq0JcIbrcWcRqVtCaw0Z8n/K1GSYzIPKCzO?= =?us-ascii?Q?ClwATSbxKEqzTfdJkG1UQNsie4sK2nXUz99GfLHQWJLkVZ5ubIvgrDRGdkO6?= =?us-ascii?Q?/BgK6bmAIgMox/lZiS2o1wVHXA4qWKL56atkhelOJdedF82e04/qwtkLBq9D?= =?us-ascii?Q?OcEmtnSzbiMwI7QtJUccN+FaBIi9GZ788dcNYwmXakhzGFZJt2YqM9WYi8gi?= =?us-ascii?Q?38D8J6IgywMI2O7RUq6rhaeExHoZDHqWVu2JwgfsjRFLIpbOjshLXkAFhUqo?= =?us-ascii?Q?ZYNP6E3Pv63p3tNJiJcMjeoVOH429MLbF1IVFmhhtHAgRXuBU+6YkGw0pa+E?= =?us-ascii?Q?gxmZIvOB1ngSlfVKy/st6Gl4ljihXguK8IexGOtRUKXpKvVH/VA33Gir5sII?= =?us-ascii?Q?9OCWUjpFY4mSS1e58KYhx7vWO253Bk3FZU4Tk+siYsEv6SmFW0vW9575qvAj?= =?us-ascii?Q?c7t3DgDMrZWdxXO2YPxRi/VzNPWf5RbBiKXCAVAN8w7Y0KqUMZA79GuJ24Pq?= =?us-ascii?Q?KrUQR2JpBtquXcLXW4naVjjlsDKGjjI3rkw6zGrlXfArO0WdXqG+PuLoSGzq?= =?us-ascii?Q?XT7TCHPspUbZusNavJpMkrcZ26k8QYR67cBSm7qe2s86yuVTq0AkIlJEBl00?= =?us-ascii?Q?s1k52orvBQkR7f5mZVoAzGY6BffO4qSZ2X0MZBWTdAFF9/CuScL2LvgXiy/m?= =?us-ascii?Q?fTSmzvEvh74pIGsKUgjQayLa614/wwngAI1c8yFUqAYPUU6s6jk+yk5i89xB?= =?us-ascii?Q?pG2g4Y53IgdLmgXrrvMKY98Ir2geei1nSbvZUX1uZtcoRz5KDmXHtpU75f/p?= =?us-ascii?Q?LVQfAT1eVOHcpz/myo8rmIXqrnMT7kncmYhbPEAdIZRNWWHq2uFPeyXFVumP?= =?us-ascii?Q?xxU=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2558; 5:grZypHfhIhKTSn2hAHDXg7U8XwPwkufasXpF0NOGqBmDXor/YargFqtjlYkFf7TJ5/3YyKW+oFcpx7bp67e3HTwLbl18/fCxmtyBIuAlQvBkks3CGxpoeVsNiWn9WcBM8kX72ota+Btbkh5yhsOL4GM738fB0hd2YWUJPQlGkhUv/j867gif4bXZaCjMdPIrQWMDzZrd7d1c2Mlev+WyFEdR1znKGmtLLY8HxGMxwvC6LkP7JRrk/Lt7JNk7KWoE3d8AGx5wrfIRWDM78c1MNvpZd5PCPt0gfnBlhvb/1XFZmPjlS4LsritEsOLLS1C92tvw/gY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Bx/jnG4Ll5AgyF4qNoCdCTSPRpI2AkH6C6D7v9zTb8HZpSjshzqSvIl1yBxeMk5IRTh2gbazkbkv+S6vyhcEMORO6xJdNxRc8kSS+i+0ef09A0Qw+20Q= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2558; 20:JmP18uKD+PX9/3ipY6pF5sEMWZ+AgDrMJwYmfMwofi0rn9rRhsvL10AC79qUs2gjmbK3soH5aEehbMiDuU3dBaiuBlkCeMc6fjvwSV3VAn/I5BDG/EuLDOjn4h775wZ9dMXBjloofGD3rV1HIzziCujBNDNHx30MFjq1ZDV+fzg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2017 14:21:54.7763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2558 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.97 Subject: [Qemu-devel] [PATCH] virtio-serial: add enable_backend callback X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbutsykin@virtuozzo.com, mst@redhat.com, dgilbert@redhat.com, amit@kernel.org, pbonzini@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP We should guarantee that RAM will not be modified while VM has a stopped state, otherwise it can lead to negative consequences during post-copy migration. In RUN_STATE_FINISH_MIGRATE step, it's expected that RAM on source side will not be modified as this could lead to non-consistent vm state on the destination side. Also RAM access during postcopy-ram migration with enabled release-ram capability can lead to sad consequences. Let's add enable_backend() callback to avoid undesirable virtioqueue changes in the guest memory. Signed-off-by: Pavel Butsykin --- hw/char/virtio-console.c | 21 +++++++++++++++++++++ hw/char/virtio-serial-bus.c | 7 +++++++ include/hw/virtio/virtio-serial.h | 3 +++ 3 files changed, 31 insertions(+) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 0cb1668c8a..b55905892e 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -163,6 +163,26 @@ static void chr_event(void *opaque, int event) } } +static void virtconsole_enable_backend(VirtIOSerialPort *port, bool enable) +{ + VirtConsole *vcon = VIRTIO_CONSOLE(port); + + if (!qemu_chr_fe_get_driver(&vcon->chr)) { + return; + } + + if (enable) { + VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_GET_CLASS(port); + + qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, + k->is_console ? NULL : chr_event, + vcon, NULL, false); + } else { + qemu_chr_fe_set_handlers(&vcon->chr, NULL, NULL, + NULL, NULL, NULL, false); + } +} + static void virtconsole_realize(DeviceState *dev, Error **errp) { VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(dev); @@ -233,6 +253,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data) k->unrealize = virtconsole_unrealize; k->have_data = flush_buf; k->set_guest_connected = set_guest_connected; + k->enable_backend = virtconsole_enable_backend; k->guest_writable = guest_writable; dc->props = virtserialport_properties; } diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index f5bc173844..f0f18c8e7c 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -637,6 +637,13 @@ static void set_status(VirtIODevice *vdev, uint8_t status) if (!(status & VIRTIO_CONFIG_S_DRIVER_OK)) { guest_reset(vser); } + + QTAILQ_FOREACH(port, &vser->ports, next) { + VirtIOSerialPortClass *vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port); + if (vsc->enable_backend) { + vsc->enable_backend(port, vdev->vm_running); + } + } } static void vser_reset(VirtIODevice *vdev) diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index b19c44727f..12657a9f39 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -58,6 +58,9 @@ typedef struct VirtIOSerialPortClass { /* Guest opened/closed device. */ void (*set_guest_connected)(VirtIOSerialPort *port, int guest_connected); + /* Enable/disable backend for virtio serial port */ + void (*enable_backend)(VirtIOSerialPort *port, bool enable); + /* Guest is now ready to accept data (virtqueues set up). */ void (*guest_ready)(VirtIOSerialPort *port);