From patchwork Wed Jul 5 14:02:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9826585 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 EFC4760317 for ; Wed, 5 Jul 2017 14:08:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4A27283C0 for ; Wed, 5 Jul 2017 14:08:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8ABD28534; Wed, 5 Jul 2017 14:08:45 +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 21EEF283C0 for ; Wed, 5 Jul 2017 14:08:45 +0000 (UTC) Received: from localhost ([::1]:46408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSkyw-0000fH-LS for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Jul 2017 10:08:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSktB-0004uP-L6 for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSkt7-0007v7-OT for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:45 -0400 Received: from mail-eopbgr30130.outbound.protection.outlook.com ([40.107.3.130]:12006 helo=EUR03-AM5-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 1dSkt7-0007ts-9d for qemu-devel@nongnu.org; Wed, 05 Jul 2017 10:02:41 -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=6wqyXlrHJf6HgndzqzAplySkxCMbef7TRFQbvFF4tAI=; b=Z4jwN0WXvoYdiibQEynodLqYnjBe+h+8j1auqLKz2VRg5TMvnrwd/QZRpCPIwh+TygGIsAIx0tMwIWLmNVjkJDjEmx5eZxMIJ4J3xrXaGN7a6UOlTjM2JmqR2aYDPymXou/NfC1i4Cg1tiINLg0t/4Hl0Nk70+SZx6za/PU8VlQ= 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 HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Wed, 5 Jul 2017 14:02:38 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 17:02:04 +0300 Message-Id: <1499263324-15184-14-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1499263324-15184-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR02CA0007.eurprd02.prod.outlook.com (2603:10a6:6:15::20) To HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ebdae06d-92ea-4f31-45b9-08d4c3ae7f66 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:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 3:apenIoC+FUHdFquSH342UYUlmt9U7X1VckYBwoDNyI2Osw0ODgyUWA5eBBwr3lVjvOThqXwU6hNPBftdP15gt38+iAERXOaCgOjVwtZjuj20XDrhSPsCEA7zuAeS/7YiSUJ/np9xCQQOstBfGZ2UZ/5Ai621guT59ZTnLlsCS2Sv73orcrzK1bDHKSb+jPqtNjehjpznEVFwW7W6vqapq0IyT2jkwihYIkxA1GkfEig5NyVbZJHpUvQ/Ax6yjWuSc4KaTF0P+AvJXqt4J7dkSR/qhQ2VAQa00l6lf3NhdaMf/Hw2Sid0vm6HeRa1uuAjSEJlqwliUsNRcuI2qbJqKtIY6OJM418+/XgS8TfEwWZCJw3HYWg7jW6RoS9rW9pjQRlsC5Tp+kCtRtBsREU8T/zWhtA9pgBXvJ5ASjwaTMF55C4F1svPPgA2MxIVBK/l1KL5/9nKeTt2q80Hh46mkwhcjiBYa14mSgOsrUMLssFRtYws5hhjTSufrEb+PLfOtKh6MDq3mqT3QEP6mkMeUZ1DneSbc3PJzngG2m86yXf4Ws2w+b7yc7JSVPhv8LiGdDp/m14PqgD/4nqi+0oxGC2DpG40HkYLLyTOWOleIQpKMReHWGoL67+Vs9L4Sfw+92YToFECdQ+dyqBi8KFM8GaXV8XZqUG9taIoIivmsYYlWvUxphtBuWzCBTMjJ3OBBzTlaMGtmsJ4XeXFpkaV+OmrrM9fzPjV663rM7TU8QzfdDFzMyJjoWdd742vEU9u X-MS-TrafficTypeDiagnostic: HE1PR0801MB1996: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 25:5uP80d9auSU6TN/IqmpaUlLYbeW3yQIw/AU6rfSlHyfYCFkgEiiZTnfQ3okUeg+YM6NXpcOc2OTxuPQkMSVfGj92XyjOrNBbcGvGvfxsxto6Dx7q/omC7NwMucoXfu1zAq/AOhDmhHHSbyp4HMHw/qpp/XeevLDbCIoYFLLRPDIeP4UkgCuGFoZnXEVY7ascPT2bHHan8TUuGoXbxChIbqbEuMSGB7S6stWigwoA7lHlRfYvWpnANsgmhtjBYyyS0Ry6blsIUFuFF3TFw88AsOse7im/++17aL7pYJBX6wr0On04Hl5i1aoMPlvBbS3LKvAXxmnPYn/wftKgydKsDLcs6q/hRjm3FnBErY2xlBAoFgEdk4blyxJW0+S020bRw1E5Vy1+KryM9z6W03woaR6DEppbhXURG2Bh9cnRvZk0ZujNOdoD7HApBsQfKrQrBCikmtV3Nfo30cV2/QROkPuNRkdfeWL1DSGydm3xNlJ3gACpqpfuBTuuR7CtvAfvJWlIty59hl6O+gS51FLmqK0RZoJuDGRlLh3Dhh+wX9z4OHbAQT+s4bEoJk6sKIZiaoNkh2zWaHHFirt5IKjhfQfmMbYy4dGGZfSyUrckUS98ATZz99KtyljxJ2GHas/y/jlk0lyx1b5zqGdNaM9Ysk81PwC3AizRLpG9w0f/P0nv9kpONcaTCDzIlOIdCGgG/ElpX+pv4cKNfkwuiDdsPXyU4ac9Qug5iIL8o6RXodVCkpVsiYZbke1BQEEwUqAgvvp20Rr2wgTeFMf0/1USe/difcH75ye1j2E1kA0JxhxA9fW3d5dD2caTY52m9czVyVT8mNJiLWvpbOOBwn2S66z7hhdaSl3AyIGtMHziQNAc5QPl3z9DVPUAl78FIk6+FIdSFQmWHdRvYS3PnHSxjlW662GuYfxd8MiclO7nd5c= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 31:0KvT8RHGk+lIWsygojMEbbrUFnVYYuOkTuMe8FInyQNnoGoK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HOzTqT5rRRZ8kKSPL6F3/244JyyoaNLNKFd4qRiH9O7zaZQ6j3ZRhcfXWa4ucYY= 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)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0801MB1996; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 4:z1By35RZwBNIYcmZHertgJiyH35u1Jrct2iRh7yU?= =?us-ascii?Q?y3sU2D6CGvlYysBjUr6eUm6KvJB2jBA8Jse8Kl9R0zjcaQJCCEgO3X/JP+Nm?= =?us-ascii?Q?kloMYBIVjTLPNxDYkj77KrdwNkBPnN5FTC5c8bDf0t9PSXyuEE+xRBnJJbhO?= =?us-ascii?Q?ibRDv6aENojY4BQ5uKObJBy8MI1jHrdRu/hk20L+35GDK/5gTGmgBRkYxrjR?= =?us-ascii?Q?s40ThtEOHd/bmMiDaOA8/iVxLdfElOop3VFh4RzNb8m1dj8KeMihlN68l4gU?= =?us-ascii?Q?Zj67H1UqdfCi4RqEWVJ0d37wDOH9sLM6TqZGVkTGyVm40GxLAAgKHsabU/2U?= =?us-ascii?Q?2NHApdF+BA7EpJuyghbxeDHnkUAwV5cnKzuSAVVnOAgggvKGTxvGU/zuuqOp?= =?us-ascii?Q?5qa5SclkMpKnQ5QBLch5WG4MN7NPLLcmeoPIrOBMsAnuvFquYkcvG/A1cJWI?= =?us-ascii?Q?/cY+C6MeJmfmEqJ1iI7pe/4KH/E+q/xlDcZorWvF/AuR+RK/AbAkwbBwawJO?= =?us-ascii?Q?aMQiBFsD8h+fzRzX7cbz9COVBOxosEQYX30qVltpR08uh/UwuE3yDBaZFcV/?= =?us-ascii?Q?6DdTikbE8M6Unrj8lke46Othh8fQsDhHwVgXwksJ8hi5E0TKWHsGH9HTlIKC?= =?us-ascii?Q?HaS6oIEf1BlV87GsbVi6ddDB5Jihx2L3X0UhEKOV/qmPyy8Wy7yzIH3MYkEM?= =?us-ascii?Q?DQsjb1jZEdwFpzRW/PaLvuOzt1E+CRHQDplMM+VSJmVMQTwQPGUk+TqCSvr/?= =?us-ascii?Q?iM1IjgCah5w3DZH/wKoWxcyWS/9BG0zFOLhPk+yk12vf2IYJ4nGJObOa/ZOH?= =?us-ascii?Q?k0mt8BbV60FlJrE9FMp3ny1lQF/VL0U9XWLogdqVpoDx+xgWcFmh1dGQJByP?= =?us-ascii?Q?h4xVYtvaMEL5Zjc3JqKFO+GzNXCA/pHwScazjcGFqsphOLYIEr8SpZTsVkYv?= =?us-ascii?Q?novhQmxmjilYlEFGMzi7FXWi1pGy+Tfsh4+p/ZSRP3Kz/BRSlXUWYqF98oJk?= =?us-ascii?Q?SkZKOj4aEEAR1NVwBMEXriuvZ0V/lAm23nKtOnqhxUjEuceXEEmczh3VKqZy?= =?us-ascii?Q?9zznCpDp5QIVWHoChRPl2eCx3gxHj/FlJkbXqjnCVyKO32sR8i3x/YT6sx0M?= =?us-ascii?Q?yPOjv0dLNpcjVPLp4XWGabh8MYLKlDpncDftlsknBbEEohwNxVRa4eSDqiS2?= =?us-ascii?Q?VR9G/BcekQFNodupWaZEl35p7RREeXcmYYeWRdc42VvV61Uwhf3kOhMeWA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0359162B6D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39410400002)(6116002)(575784001)(3846002)(8676002)(2950100002)(2361001)(6666003)(33646002)(2351001)(53936002)(86362001)(2906002)(38730400002)(5003940100001)(107886003)(110136004)(50226002)(42186005)(6512007)(81166006)(4326008)(25786009)(50986999)(478600001)(189998001)(76176999)(5660300001)(6506006)(6486002)(66066001)(50466002)(36756003)(7736002)(6916009)(48376002)(47776003)(305945005)(53416004); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1996; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 23:JWC4zsddW3F55jztlxeg+blXlro8Yx8okI7Icx0?= =?us-ascii?Q?DamWUzezmwhyCWZ10mO2iN2A2c0gM1FQarSvZNZEyjbpdK/7x3x8bduqfSiZ?= =?us-ascii?Q?8yTLMIhjryHOdvhdj4GGe1lSvs0l0y9KpA3MV/aORfQuCbnDQQT9GFQmC7p5?= =?us-ascii?Q?FiQh+bbqTOG7DAzLAysvpt6nRNLX66E3lod+m5g4gWJ9UdZUGf+ejhRFUtoL?= =?us-ascii?Q?i+VMbchaMmQSr6P0wzJ7qtXu2IQBvM2NSzpqIME2GRpElgBq8BOgdRUh8zN2?= =?us-ascii?Q?fnj4lVn5QecMvlRA1GCGXHa/J6mTYeAR2YeDCQYbd4CEyWjS3XuEBb4b5tTh?= =?us-ascii?Q?YEakgfhFhH8DoVHFoHo3u42b2fMEWIX3nkY1wRESweUddAIYHUe0gYuuHsX2?= =?us-ascii?Q?l2AW2MxcNJ9vPYdKyWg7E7khPb6VkwCIl+m/I3ndH/ahOMK/0vgfKtPoW8ko?= =?us-ascii?Q?52GXoH29VHsvZra7MBn0UJV/V0c8DqsqGQA2XLXrVB5JX6ypZ3HXuYC7P4wM?= =?us-ascii?Q?rEXou6AiHUEpau+yVwOd2zA5hTvCUaq/WSSgiJZ+/tqBcxiLt0c+OJ6HQnne?= =?us-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nGVCelYKXF45+axDu0Oh73TsO4EcN1z66IAzqWLr1NTSzsu1?= =?us-ascii?Q?TRygXjPYMWAtIMdWt87RAr50S+bTPDW+Y8Q8Rj/XCXSZZ/stTbEx88kooAr2?= =?us-ascii?Q?U1buwtdv+aONMy1YgzXZn/1eO0LDd12x3ChWgBXIlI1Fgkd1RtJnXQpRHCcN?= =?us-ascii?Q?z04H6i+iybaIrRG13b8PBLIu3q6qap6nXaiG3oMugAmHdccy0KVKPYgneP9T?= =?us-ascii?Q?IJbYPkCdn84U9FeDyciqb0IqFayTwaFLed8QU4PvOlbd0ZQq/kqHy/MeSRpY?= =?us-ascii?Q?3Y1+xIBqlSPyH995iofe34KygIgDf2oEqapIqwGLKE2wMXFL38Fnj0vDyH+j?= =?us-ascii?Q?r06ci0WElib1QarTSaobxrQPy4A4XsUqgubX3BNSB8yxiXe4YVsDA10n5BR6?= =?us-ascii?Q?kED3iGLr8lnSwROuFX1q6PyN3you/gmC8CKjr+1rJEXutlXSA85WKsQr9Gwm?= =?us-ascii?Q?Mw4KZeCK/FzcTTz1tsHyFitH+zgm08zYw6DQr27qrXzeifZJoy41+u/jsOEG?= =?us-ascii?Q?VQWqsqOBOUd52mvkjtoNdXOQEtCy1v5hGtJg2g8jFDoc6GBCAgO2Tcgl8k5w?= =?us-ascii?Q?jOVQ+2UVBvxOu/r1oskFuF2Ksk7pAhx8lj1RV6gzBHsJUncfUY2JKxlyFk8d?= =?us-ascii?Q?IBJtgOtwcCFYZaBTOgPQADNewEL3eXNKDaRLDhSeLxJOppUwaRmLRjXqjAyo?= =?us-ascii?Q?SWc=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 5:lKxjZv1HatNvCiU+YCSI41PsJvSuhPEUZcMaiFqDuctsKavJFw4WMOT1NOGoMoS5BEF1IOX5+K6j/z00W+x0T6aWGPpVvACyk0f+Au8AEZxkjIH9nkEEteqfzwzRUrlOjY+smg0vSOziujYaYx2tvAGWnOFoaPzHT52eL2D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wHwsKTlPab2gBF2zvv+2298HgscajU4gsnmbvGbAzhAvAFlCLbeFWKpMZ7NAHCUl+lQcK6+9HLIiLA/vu1/O9YKLMhSDe5H9T4/KVlVqIWeE7ad6doxgFcBw/DSaLqXUoZA4r/m8DwZ1VfT60Lft3Z4UIbRYqrRd+HKsh9iFLQImFK7u4obomNuHg6iM87ktYS0MgwYu33xFkrmekVpDln5uHbEzNIBjzO8Sry6aWprHtFFx4x3OKyiU3P5AyX+4CEarA+5y5snyFcIUqZZ5td3eG5EE= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:lhhznOKwIqBB6OSxtXNDmlU8eZEaw/5X/NxtQUGmUlgNMEedytwRWgH1Vuuvsnq+zx4T5Bv+q4/yKCV/8kmMq9+1d2JLaL4nt7qUcAWc75hzwyctuPVR37UVANWYJ3i8Yf6NDjRoI6OtFxyd9p4ElfCwaIaSMSkM45rgN/Rdfvk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 14:02:38.3342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1996 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.130 Subject: [Qemu-devel] [PATCH v5 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: 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 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 --- 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);