From patchwork Thu Jul 6 12:08:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9828139 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 27B9560361 for ; Thu, 6 Jul 2017 12:20:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1858B2842E for ; Thu, 6 Jul 2017 12:20:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C8DB28651; Thu, 6 Jul 2017 12:20: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 84F1128573 for ; Thu, 6 Jul 2017 12:20:49 +0000 (UTC) Received: from localhost ([::1]:51193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5m4-0005nI-Og for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 08:20:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5cH-000635-PH for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT5cD-000588-Fy for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:41 -0400 Received: from mail-ve1eur01on0096.outbound.protection.outlook.com ([104.47.1.96]:63928 helo=EUR01-VE1-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 1dT5cC-000559-QM for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:37 -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=LAQTzvq0l/QS7/AhjgmPQaEjYsfms6FDcCk6DEUDFDQ=; b=DWXza/bpxmO5C6gpAfCsE/BwkJrj4IzRs7U0kThGzcm5I2NVIPTUFqK35XwjolVjd0YBUcoOYx687WKMyDJxu4eX7CWnd5DyGnNU0v5WkwhszS0r86PJdwVQ4wCXYLON0MlXCNU6HuGll/17hi93hjoKmT9rPtz26cgtHgFcg5s= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Thu, 6 Jul 2017 12:10:29 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 15:08:58 +0300 Message-Id: <1499342940-56739-12-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499342940-56739-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2PR02CA0118.apcprd02.prod.outlook.com (2a01:111:e400:79aa::44) To AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 579fc4b0-3954-4859-a968-08d4c468013e 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:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 3:S76s/hlWU/MdtAv4yIikf+WoI1FXouyv3aBLrsJeUbOFWsaDREwED4CTk6khwxX6LaEnhfMVdW3PXTVr293m6YEQBvJf9nqhsXqIJMjD3hqqs5+MJerPDy5jnV8sAoluJR4KCyMXygdrsvwYfET8p3MA8bfYMzK4Hc6dZm2+AsMYdQPF89PJOujJkXI+qcxW1nGq6itXIdym3O/cEv9tMqrGPo7eWsGuoUNogqqLu46c5dni3NhNXBNIJZ+gCgK1uW/vUaJmPoLCdRcR5Wf/VGSO9unnMEgigvvUpPJOB/ckmWQEu5s6r0Of/8bRzECASitX1jcIxh5zhBKGNhjEH+/XU1SleEUFPB6M8gsUDbGvta5IBFJc0zl6to49V/lD8yMMNQkODgRVYNHPE4Ucao6Q+taYRFWYTUcRSxI0O3TmOIjNBTE1q+GYm0zJAVMZqWhxrgM9qKG79sELvl1CXUL6GoYgaoSG6NIF0Fd82N6lxxIUVNrSlgxiljRwa3RebI2aJhJZ1aYE1ZT6mDHF2KuwNUcWRYv3JQZOJandKsZ9fNUatcS0Aacwugi/2fbprr0iGWfOYn8qVWXg9mlLXfAMFQNYWhij6FsNFkETLBM7/UaOLkwHTnyS9OSu7Fwc0wgJ2G1sn4HFmF4X6mtSZmMX4eyFVN3fkqkFWef9rKFdYpAloIdWgz8Aq93XDMf2leRLa7Tt3TFZxuptQAakMcxEAJHochlpFTrH63ko+pbegx+pVFodom7eNwVo+9DU X-MS-TrafficTypeDiagnostic: AM5PR0801MB1985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Hi40Ka6J+4H8U= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1985; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1985; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 4:D4vPbBtk+3VK+GyxClGy91CYz9/chz0ee3JmiGDd?= =?us-ascii?Q?keP19mINla+vgyedAHLiu/dRFJwo2oE+PGCnFZkoZrzCDdg8xvkPQwIGggMD?= =?us-ascii?Q?MOkX6oJNRRqMbSXIZCNZ1JRpesDzyXSu89iI3CnxA2AytWrBZ2o2pPWoBMcP?= =?us-ascii?Q?U9mXbDVZGpKhE9LdGP1dN9fvKNaMqUTh4mSsw8SkTemJKXUw9INLxu1APoXV?= =?us-ascii?Q?yZ89kFwfUKxPJp8h7AbMLl9vohpqik0aLzv0ap2kRdJetvrzCavaPxeDBisw?= =?us-ascii?Q?uB1A83dd4gC9pMoHukC2SHE0JluGCpPxWCvr35NW9yVp6rdPFedl9u+UUPOH?= =?us-ascii?Q?+jKhQS/tjNz/zjHgwOdk1kbdyyhYwCxW8clMli7d7d81wRgF8Dz3OCSfZ9MT?= =?us-ascii?Q?NNl41N2u4/N5FSl2q2f2IN6OW3QIXkB+cb64kvxq+KpWUW2Ih2OVNCX2FsGO?= =?us-ascii?Q?lpmfnLYM4hQ5LCgSY4efADmQ1Z4wqy2nONoEr4YqqQ1oK/BGv3umdTc9vTn1?= =?us-ascii?Q?XtRsk/WGkds55iHLyJqoRm80u81Op7bz5xjpG+GUexIZCM2g2ghNXobbmXea?= =?us-ascii?Q?R8Xf3JQ4RlQEntgiF+HgpCNdIwI4FjMslPqbn0sI0y8rd0ldt9FKjhAt7/YK?= =?us-ascii?Q?S4xgcCz9QD+X+EgFlpPhPrro6Dad06pXSf9zc7dJi7pyJc1ZTHuVz1wVQuhW?= =?us-ascii?Q?LEVNM+zsTUjTBIxK/HrVzGkedt/9gOQ4AC0JM1CbxH7r4tH1t7JWOfGuj46S?= =?us-ascii?Q?7cdZ/WkhQgupTd9NVSIz3M3oOFsE6wpI4zfv7I0Np+4NUITrq7+rG3kI6VdG?= =?us-ascii?Q?Y40x09Fo4q9AE3+6tnshHFlWP+yv4S9kL2LLDRa+HtSAJ2Pm0X1oBm0AGUZI?= =?us-ascii?Q?ePvgfzOXkmYvLfWm3gzSfYczY/zYVVFswtRvOZL45wdEfTS/pPrkt5tAE/B6?= =?us-ascii?Q?Rz37OSllMOdN0YV3B/Q8wTraYPHN9s87RptlvkGxdDDM/W5k+mnaTNgIUVcI?= =?us-ascii?Q?xgnerUsqcaILx+N/fK7/wWem0Kh8e08/FWQbwRcQj38b7V5rUny6Lt78iy1u?= =?us-ascii?Q?/QuLcI12kIvs+ROOl05wRGXlzqaZyGj/F8XIGP61Rv6t2uo5ag0Ev8Y2CCFg?= =?us-ascii?Q?f1o5hQk/74OFwFWq04xmfOJXhX+7rp6b738J2I6EZVDnYlODvp5aG1saf5gn?= =?us-ascii?Q?sH8gZzKVP/aDpyIoSpEo84lgVCL0MNOZj8p+xYYqriCqOaI7JwaJBLYhHsGE?= =?us-ascii?Q?h/5w+xrQY4Wra3OXhNM=3D?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39410400002)(81166006)(8676002)(36756003)(2351001)(50226002)(25786009)(86362001)(50466002)(305945005)(478600001)(48376002)(5660300001)(189998001)(6116002)(5003940100001)(3846002)(7736002)(4326008)(107886003)(38730400002)(66066001)(110136004)(47776003)(2950100002)(53936002)(6666003)(76176999)(6506006)(6512007)(2361001)(6916009)(33646002)(50986999)(42186005)(6486002)(2906002)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1985; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 23:Hqs16wSixWcLBxSH7dMFNTXJ0OecjVhiNySD2uM?= =?us-ascii?Q?cbxadhci0YTZ5c8RQPhq1rjUKssiQ9pQhD8t9ItL1wvVYEpFmDuoyawNQ04F?= =?us-ascii?Q?TRWIApxdVRw+p/WqBDDVXKxfi7/ksviNXB2K/WWJ+csFxabNESbGuXn/iYLo?= =?us-ascii?Q?6KWZtK2iU3MI5mcTpFKA2L5NwVyzlGiJq3umBRuSwRgSAaO8Lwn2v1wtVdjY?= =?us-ascii?Q?tAXvGzFqhixiOao5JONByvLw0UNrYYwN5jfCQ1zQB/hsmxGm5D37FHi8i25t?= =?us-ascii?Q?T263N8z+5cIqZo1CultJdI6YNd7TlQIA5m7ycdXJu3JF85jTofT9TGHkrVUA?= =?us-ascii?Q?H5NdIARBwNR+YX2rAYIbQE2cgqhRk3sHV+JYdS4yMoKNkmEM7OZ5xJ5EqnOL?= =?us-ascii?Q?Qk79m736whZsXetj1Dt9O3egXlq1O4DoYKSRzvOxrshcsAT+AuISItHkTQbF?= =?us-ascii?Q?7smW9IbOKFBxm4jsEuTeDRBY29wT2t0lbgO9RiV6QbC7KQeNPbUsoASXc31y?= =?us-ascii?Q?sAAaqRBJTI0oUA9/BWgGOB/j0lwIgm85mwWwUqpxpxXf7L5dKOKWpvy546AE?= =?us-ascii?Q?i1n6ZbsQuTqK3QlZzPYP+FEczSsMlv56zAFEgI6x59Bcp7dwi/ei7S34JLup?= =?us-ascii?Q?dqdeXeLjxljXQBhT5ojNV2MPgw2Rm396YkOPScld68wFTU7J17BO8wZ6pR+y?= =?us-ascii?Q?1Kq5UavUBM5wylxkjXGZu7+rhQvRAI6eM+giDARpMWyKovNj0+ds3ADv9gbC?= =?us-ascii?Q?oItKfUotPY35WmGRJ2st7P4gAUnWuOzYhGke6GkjK9b4k+H8rhvTSBj9jhF5?= =?us-ascii?Q?H1ooyXW8POKcXLLfxNMhYDlKfxzfHw0QoBFjSFllj+rx9VmhQO1BN224uT4W?= =?us-ascii?Q?axqoxziyprYs/FcHVVAxb0S41NBmhvkhLyn44wyTgIXY9I8jfqfdAhw3dwbG?= =?us-ascii?Q?lVKRJRvsyKG9HlkH0aRwNCz2g/k/roTh8PJfAdY5JDcTgkzXdLXGYByaPF3F?= =?us-ascii?Q?s2vrjlGYtvYLoFsr3wxNZLWxLXsQa9ytdm51vxXeGlUK7IpFII1dFAO9Ot10?= =?us-ascii?Q?DFH6RtYOkHcCj7zTLJH9Sy0jtGzhb?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1985; 6:A0ILZRBkhZ40OogwJD9740mLeAl15qMNGIm6WnOe?= =?us-ascii?Q?zjzccQLyqcljCK+kES89cxOVloGzd1Da7QIWKQaOgVOgf7YcUNBUs6G9PhxD?= =?us-ascii?Q?ZsoX/J9CcIrHHdVKELYTOWaBGVYWX2w2y5WU/Qy8tTTzCkZh8k7ffjUxc3PI?= =?us-ascii?Q?0nrs2NsiXLn64m38fb/dEQq6kT+3Ngun74aVKrsAFuoT205R3xO6uKnT1adr?= =?us-ascii?Q?eikVLOwFWLlqj5asBz6i0TfJFna7XfGxK0SOHotq3dyFSVnowqYjx1DFo+72?= =?us-ascii?Q?bjBerZFoyTqKoAKhvIYGx8F5p+7Vig/aEa/itmVsEV6cfMdbQ7Xz6GDIPgI4?= =?us-ascii?Q?n1b/upW90ZgIJK6m6XpkzpVwWp2+ekt08m9uphRDzFWxtqo4fcxUIIGSsvQl?= =?us-ascii?Q?5OTBUBzf+3eWnMhWJqj8i24Zjv2CIzgrh2s8idVHjhbW/8jTNDUjAh87qg1l?= =?us-ascii?Q?GlrigLHm0Ru+U0ZoVkPe7CO5cVODzx60w4qoV8Q65SrbOu+T5aVFlll8wybG?= =?us-ascii?Q?uYGRd66GTntFhKN2Y8eEa7x0Woa13Sx8kCbP3juttut0UXiSh6XSYXU+tzRP?= =?us-ascii?Q?e+QJGiRj2DUaD8HX43g9iusBKHCzpNwf2n6S2ht3ZEjMCoEXjUsRtXLzAxuP?= =?us-ascii?Q?uUgFElOdNj+Wvyuz9tJhYSBgXavcBtG7TEOhnr18druW4obUiNt7E8WqfhMS?= =?us-ascii?Q?VbDY3H4Nyugwm038Lez4TDpMMfHqYSeYo81R/tnwF696LprvGFH1SDF5txtX?= =?us-ascii?Q?eI3it5nYTbfhvZ6AjG1a+T85bNA40s2nims9aosLryNoOrESFxJ+k61mQtFw?= =?us-ascii?Q?4MWLgzGo7/Tb89KC+DlDm7JTvcIewn2iJfJyr9blWivNT8M/ICM0Jq9q2UDP?= =?us-ascii?Q?h+7iQ/14rj26e4+uMWcVJuRQxnq1e7jqXwHh2T1EV1EssX65tAyavSI3c8VL?= =?us-ascii?Q?x+ukj5ODl3ujAKJbscyMJCtxlPtIGwlE34B+bY/kV9vNE/cDmq3Gu9YnBaiQ?= =?us-ascii?Q?+rk=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 5:tFPShEZfzpbySklRQuR5ei0+A8AU6mEx7f0geMRz6fTP7hnGLG6bfXEnpRemuVzNOLYF+rSxQDUcuPDuQqCnLrCrvetGBGN8QU2eC6mZ3tYjJkxglTATdlM/D15HTyho5uu1Ew1wHLwxIK6aD98cuk8oG3ZDpKbdKMBh/74ox41EtUU34BS5YERZR0Xm0J9clc+aloPpjseEozwyG5U0LCBWzT6EVuiSnPdPMKuWtZQcltPQp+kiZPS5N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ubVkyP1eQ44w3qfiqxukjyR1g8GFHmIXj0bgzqoH7jZ8S4ANxGuzOP/dfUgf/0aGrjd2uzOsyBiBsPoTp/79GWeBJBdHXZWtLmHy0DjGb9gHmLTaz9uSXuI/c86j/dLE4vWKa3mbgK3CV0Uaqgr15jkr8IM6EItCBx4CnS6V54LVaRnDLa+ji9jmns= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 20:DK6ADDuYwqVYAFVyeCA+hSmaWu1MEQXUk+LUMElg4E/mYjV+rZx6eKTC9TCkECrkrgXEx9WNef+hSQAfmKAMxVnKfR8GZCH7y9/XG6NP3xomBGN0WGNy3FjPQYz/L1AgFLDyJjqgqCIe2FUca3kJ22VgZFBJdsYVPPJXaqpgLCk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 12:10:29.3858 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1985 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.96 Subject: [Qemu-devel] [PATCH v6 11/13] virtio-console: chardev hotswap support 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: Anton Nefedov , den@virtuozzo.com, amit@kernel.org, mst@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In case of a backend change, the handler functions and the watch have to be reset. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy --- hw/char/virtio-console.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 4d3967c..198b2a8 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -163,6 +163,30 @@ static void chr_event(void *opaque, int event) } } +static int chr_be_change(void *opaque) +{ + VirtConsole *vcon = opaque; + VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); + VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_GET_CLASS(port); + + if (k->is_console) { + qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, + NULL, chr_be_change, vcon, NULL, true); + } else { + qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, + chr_event, chr_be_change, vcon, NULL, false); + } + + if (vcon->watch) { + g_source_remove(vcon->watch); + vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, + G_IO_OUT | G_IO_HUP, + chr_write_unblocked, vcon); + } + + return 0; +} + static void virtconsole_realize(DeviceState *dev, Error **errp) { VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(dev); @@ -187,11 +211,13 @@ static void virtconsole_realize(DeviceState *dev, Error **errp) */ if (k->is_console) { qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, - NULL, NULL, vcon, NULL, true); + NULL, chr_be_change, + vcon, NULL, true); virtio_serial_open(port); } else { qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, - chr_event, NULL, vcon, NULL, false); + chr_event, chr_be_change, + vcon, NULL, false); } } }