From patchwork Mon Jun 26 16:45:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9810095 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 9BED960329 for ; Mon, 26 Jun 2017 16:50:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 949962811A for ; Mon, 26 Jun 2017 16:50:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A0428546; Mon, 26 Jun 2017 16:50:07 +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 CFAC12811A for ; Mon, 26 Jun 2017 16:50:06 +0000 (UTC) Received: from localhost ([::1]:47635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXDA-0004Ez-Ku for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Jun 2017 12:50:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPXAn-0003Fq-I2 for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPXAk-0003I8-9e for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:37 -0400 Received: from mail-eopbgr50132.outbound.protection.outlook.com ([40.107.5.132]:29696 helo=EUR03-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 1dPXAj-0003Gy-UQ for qemu-devel@nongnu.org; Mon, 26 Jun 2017 12:47:34 -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=isVLlkM4T2prvvLsgh9eFPg/drZejIDle8bVZ3MJcCs=; b=bP1fOVJ5b6k2BuYGobhNPvOc8QlzcI8EkNEqgdaR2eIlH+krhKMok2wVbcZ62NOZxY8Mr1xrVQBexldE7vJ2aMrtxFmemNKE0ds6XUco9KRaQaLPLVgcfGQaJ2yBOoS0Rr1D1swjlmNnsb/6TMdUJOmJcB18rZIQXnqGpcB9ygo= 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 VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 16:47:27 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 26 Jun 2017 19:45:50 +0300 Message-Id: <1498495550-72357-14-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1498495550-72357-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::23) To VI1PR0801MB1998.eurprd08.prod.outlook.com (2603:10a6:800:8a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c800d10e-104b-4d66-dbbf-08d4bcb309cf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 3:hNRWwPtcooZ7QmM5hUW04PZDVvlqjts72CGC3/p4O2aAMN3fb1q9j1raL6FGLW1pMBLpIO6pwueu8+fnW9WyXvq+THFyDdSJk4b6STKmDLOXT+5B8Lybr6xeV8qpW7RqbaCCXLDv++3CEsR/JM9GCFiMAv6gAWgJMGuA41e0Z1qrcOUVQk8SSu6oiQ7g90kFV+zoIoj1Ny5dKcHgdk6m0y07Rcg0IYe+zthYyrMs5k0FNKtxLEsWXkimv2nsA77qbhPwGvYgBk9WtiMvS/XezWtpcNee61CwHNrgL2H5DCqzDx6ppSKE1Lwpg4l3Jn8cRXhukYtAAz5BSB0/NIkbgUzo5e3hQbYcNJxjERt6dDu5JWsZB7fU2ePNQ3rnx0eq2SSSPsxxtU89934NAhu231y1tuN5QcGwmb0Jf/7PNN87F+EYBbB4LkoTAMGWhJCIe+pljn4H8IzRb0QcnP2ybxsN75lTgxXfzqELUFHrgkNnR7m9wwvUprf844cg1jnTM6rS/W6Zqr1ndcURe+ZZlQl/9uH1dyP6Oqcs4xPwjRBYtMGEu17WMvnG9CMG3rh5r7Lnq5OVvB5REf1RGkvpLgV4UrL7BADbbIZXEpBNBN2+pyrUajt4AVxGp6MkCbnG/iZsGMY7JlxCzzCznOesFr97fyp7SiwZ06aU56cFe8kAdKySKGfe5cg0ocW2Pe9+ X-MS-TrafficTypeDiagnostic: VI1PR0801MB1998: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 25:35MWiR4zZ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(133145235818549)(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1998; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1998; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 4:VIwYVX5Yw4/6dj7MdQFL4JqvnkO7VpblBaxcgQP1?= =?us-ascii?Q?+sm3enu9VKFQXFfOu6hUXkKIkEDYkpjx7nAJ+gmIP47vRTz9hwEVuIxl5Oql?= =?us-ascii?Q?FxXX5nHwbHRRGUfjHj+0JLFDW72BzBzQp2qLe/fPiyVMsPTv/iv98fNx7uRy?= =?us-ascii?Q?soHBKDMxylJPlQCcYLN7bOjV6vZoQouqn8P8sB0FQt++phIZe3BswfjcZSFz?= =?us-ascii?Q?eIsa5R6VUxISgaBjMbtaEUAGo6pFSOoFjX0rxA+DJTaRl9GoD9fn6cgBwwtW?= =?us-ascii?Q?guGTu+3poOWe7W10YU6ve4IutE1ed5dtzFsntIycEWFYRdVYDqdhSw2eZHER?= =?us-ascii?Q?9pupkp8KGDQaz7PDTNxFaubeggoX+ediBIX9rfvLcy8olbmZo1qDtmz+NzsQ?= =?us-ascii?Q?Nh1DM6mdXA6gEaTMl/YwiPPuT6oLBeq9bv8zdz0GhpmIn3ql0nDt7BGied2I?= =?us-ascii?Q?VJ0OI3awnkddbnvExlZvmnLft2icLTe0jQrN+K6N5wnalLMyEdmZPf7mrxCz?= =?us-ascii?Q?sYuq2Tr8bUFPBhjl5NQOpZqkjplcasMq3agfRRP+AdmI5b2qIUgUlAtIaMvQ?= =?us-ascii?Q?mSy5W00ZI50W7MYDA2axaRR98+5XjaB5Bm3bpVOjb/jNx4TrQ9+pHFoqrQx/?= =?us-ascii?Q?y9sZ/0coO5xT9eKhwjlWzMxMXWkTAWzCgTZLKkiNrLYfDliy37+3qp25czcK?= =?us-ascii?Q?Q7Z4hf2o+orIUsWDgQGN8dFWl0hX+CSlI+bU/0HZcPK1dwOfFlOHn3GuNIpW?= =?us-ascii?Q?ECsNQE6aU5P02r6DDZexQfQlxg8Kj6wDPetA1PfS8LQzcZXxvG36mDgdFXOu?= =?us-ascii?Q?VakCZ9oggM8L3jfzHs2Mb/kSIsjbzscJ5j7AlUw9yFuVMbqC5GT4SGwOWFNE?= =?us-ascii?Q?l9PAqwlKWq7sGYyRP9dTyAAfJbOvt9puCXdhKCI/aPk+YvQ3NDCtFZJD+UeJ?= =?us-ascii?Q?y9wtEjSm5VQECmH0LeVz0L2QSfaTOQDXl0jlpzFEibpWVY3YtVaL2hnO16L7?= =?us-ascii?Q?587nP+uD10X8lf75EMeyrNj4QKaTDxJm525SuqPKIXcC3mqKtrcQAYcm7e6V?= =?us-ascii?Q?p1Nnmg1x2HsypSFRN2bHcfoT+Q8qJW0/Me17blISqJka5cm2dapFsdrWANBo?= =?us-ascii?Q?tvFlhV27qC3Ql4Cm5hA64JkL4ohydZKjxIPvONuipxWxK/a8Wj9u9nIjUKKd?= =?us-ascii?Q?v5mgXmyylJNjFmD/5LdnvfSjVA2W3j9ILat5/V92s5dSsSjrKUDAmnz9NA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(189998001)(575784001)(86362001)(53416004)(478600001)(53936002)(6486002)(5660300001)(50226002)(50466002)(42186005)(48376002)(5003940100001)(36756003)(81166006)(25786009)(50986999)(6506006)(76176999)(3846002)(66066001)(47776003)(305945005)(33646002)(54906002)(2906002)(38730400002)(110136004)(2361001)(6116002)(4326008)(7736002)(6512007)(2351001)(2950100002)(8676002)(6666003)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1998; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1998; 23:elFH7Lwlr9PVGCFgBYwycwVMleH7rtbJkOt6qV9?= =?us-ascii?Q?ScvtH7q3enb3US99c32TmeUYa6vfZ+0MxwMulp8iH7Z92BdjwOPQEewfyH2Z?= =?us-ascii?Q?hEL+8xoUIUBF0bEX2sxFmlKt9M2+LEUUMq62SpLE0ommRsrQrEjp0rXSRnw5?= =?us-ascii?Q?OQUpUSleGZabujqdBb8xhZqfgJx22+ZCTxbYyUQ8VHH81fCDATz0PW5aQx8s?= =?us-ascii?Q?KoV/HpfrOoOEY9ORQ2wYy681a/Hw2yhqYaBJWu8qNVSvFNQ4oVV2CEVKGLvv?= =?us-ascii?Q?Wq3eUq2kjBFvr/Wl0SPy8xZQjLyosqbmOfMExN441k0dVZdtop4pT6qNv08Z?= =?us-ascii?Q?uh1J68A5fmALLK+YdIEPrUeQAT1d1XXE87eFOYmYDsFiYeuU4HPeiMaTEt4w?= =?us-ascii?Q?5Xcnb0xA9cJH/pp5NaesAzC5iQ2JMVy+1YbvVaB0ywfsf8hY9dnQXdyIFdsT?= =?us-ascii?Q?29QShTBxqa/Ayl1nL9ZAy2rl07agG8YBlo4QhwonJLS/UqjDKaC9h/R42oIg?= =?us-ascii?Q?52FMHYgo8udaTN5AbefLTC5BwfTtM8mG3/6vj3t2eKkNd/pJ9xtKhkQF/gfT?= =?us-ascii?Q?bhKdjMAluUaJaPi3UQ8HeeQ/soMoDW/qpNwSm1JeB85cwwNREaVoPKQRBphg?= =?us-ascii?Q?u0uzNeqyfrEWbQZm8iWtGiNaf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LQ7IcrWOTJ8wutX+eGw1eKD11NAz0wFphEcbUhiWuAklL4+q3tVMTOtjjfQgnzH7apYSwz28NJbQnoXUdnJ0R81RyPPSUyrP3o8DI1oqK0Ie6/DsGw9mng2XD1lfxut767/dYdIZirM9VDlUfXa1RCWUmF1UY4ITJJOK/Y9zXpYSFw= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1998; 20:c21G4vQhzmecjACREs5h0xg913YkeVLvIqwlZdj0JeP+GBQPs5SJuFfLPg4jP4R2aLxK1asZANnytyc9p4ysLX44LamuEINjNTwCjQOd2Q/RaZ0AjXOjAo+iL0g+E76/t1M9gFRysFt8J5VUo4cBVRHVdIIx6idTNIW2xQYEAJ4= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 16:47:27.3523 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1998 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.5.132 Subject: [Qemu-devel] [PATCH v4 13/13] serial: 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: pbonzini@redhat.com, Anton Nefedov , "Michael S . Tsirkin" , den@virtuozzo.com, marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP for a backend change, a number of ioctls has to be replayed to sync the current setup of a frontend to a backend tty. This is hopefully enough so we don't have to track, store and replay the whole original control byte sequence. Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Michael S. Tsirkin CC: Paolo Bonzini --- hw/char/serial.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index e47f0b6..9aec6c6 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -891,9 +891,37 @@ static void serial_reset(void *opaque) s->msr &= ~UART_MSR_ANY_DELTA; } +static int serial_be_change(void *opaque) +{ + SerialState *s = opaque; + + qemu_chr_fe_set_handlers(&s->chr, serial_can_receive1, serial_receive1, + serial_event, serial_be_change, s, NULL, true); + + serial_update_parameters(s); + + qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_BREAK, + &s->last_break_enable); + + s->poll_msl = (s->ier & UART_IER_MSI) ? 1 : 0; + serial_update_msl(s); + + if (s->poll_msl >= 0 && !(s->mcr & UART_MCR_LOOP)) { + serial_update_tiocm(s); + } + + if (s->watch_tag > 0) { + g_source_remove(s->watch_tag); + s->watch_tag = qemu_chr_fe_add_watch(&s->chr, G_IO_OUT | G_IO_HUP, + serial_watch_cb, s); + } + + return 0; +} + void serial_realize_core(SerialState *s, Error **errp) { - if (!qemu_chr_fe_get_driver(&s->chr)) { + if (!qemu_chr_fe_backend_connected(&s->chr)) { error_setg(errp, "Can't create serial device, empty char device"); return; } @@ -904,7 +932,7 @@ void serial_realize_core(SerialState *s, Error **errp) qemu_register_reset(serial_reset, s); qemu_chr_fe_set_handlers(&s->chr, serial_can_receive1, serial_receive1, - serial_event, NULL, s, NULL, true); + serial_event, serial_be_change, s, NULL, true); fifo8_create(&s->recv_fifo, UART_FIFO_LENGTH); fifo8_create(&s->xmit_fifo, UART_FIFO_LENGTH); serial_reset(s);