From patchwork Thu Jul 6 12:09:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9828137 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 96F6E60361 for ; Thu, 6 Jul 2017 12:20:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 872D72857E for ; Thu, 6 Jul 2017 12:20:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD5128614; Thu, 6 Jul 2017 12:20:47 +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 BEFCB2864B for ; Thu, 6 Jul 2017 12:20:46 +0000 (UTC) Received: from localhost ([::1]:51192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5m1-0005lQ-UO for patchwork-qemu-devel@patchwork.kernel.org; Thu, 06 Jul 2017 08:20:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT5cS-0006B5-Vq for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT5cO-0005Li-VP for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:52 -0400 Received: from mail-ve1eur01on0120.outbound.protection.outlook.com ([104.47.1.120]:17993 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 1dT5cO-0005K0-Ex for qemu-devel@nongnu.org; Thu, 06 Jul 2017 08:10:48 -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=sHz3z9qRQTocBWGEGmyVlvxGEBlueBb6diUFHTzyjHM=; b=JroMElsOdLZrOEqVA8j8TCJMr1jMatBk6mEBwKtNRKQBsLTN+aw4uXjvGOEn9z9wsqbkNaATKRbC5ez/uwDp57skTJOJyBqkWTXBxzs5fEapv0Mef6GNv8Wz8Y7ORXwzqVGBV4TiymmJXeF7C/OeEsc51xM2Qr8xnbX/FurpgBw= 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:41 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Thu, 6 Jul 2017 15:09:00 +0300 Message-Id: <1499342940-56739-14-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: 6109230c-f81d-4cea-1e8a-08d4c4680849 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:GrVAvwc8obxr6IZxsTicbaMPfDRyRuxFpCi12tl8gaqrmFTRrFlA+BENjZRa0lqkXVvS+VJD9+zpVa8i/zppvO5cUdU9KIl8LjhbCgSlsstGpTeeCdXo5/j5IGtVbUlWv3/oYUp4169AKvMb/ojq8uOEgKprDSkjNSOKsXuNXdZNGdR7IV1mjz2p82Ix5teK/NlrRkBl4Xvh88ovUHcoWqQT7HeyOLpm1wGeQnu2Zw/a+dhYwt41Rj3EIiKjqEmfH2txnaP+X96GeIIQcsJaZ+iSJ4ilzFq0xfD6Zrc5av/KzIIuE9Id111T7JPkggMAlzuyIQC6u5GOc+liLgenvHTe8hUyZaozxyGWyEmeskQJFceq9vP54NbpSrF6998bGznEpHgIh9Ke8MbYErK0QPgJ1ed4GpBkd0f6uRGFuFhI0689trAasHCa/yrIGO8CXiv4/EUW7zKSGCuZYdVQe9N2SeOpxgPNWfwBnNBphkwGFdb6fiD8LE4s1fcD5hoEhPaBcynIMtZU9H9FKwLOM1EHSYYC6eOSOR0Y0HXMKjYAPUy9EgKelz5GsgSmp32+ZwYAkePlP76D93Y+LqwLawrQcGElj8dBHEKkoYo+qygfITYVgYmq0+aNaaeFwgWbOMx2yrMBuc0AZ1H7b2OKYwaxdjPkxFbhGXG1KugL5/A1qGEDFoyNuuUPlal1I5YKBSz0gZjkYx7GlhWtVNjhdJy8wDxaO8dW3lT7FAlVnt0bFLwlYhNaXQQ4jzm2SyGC X-MS-Tr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Hv5DIlkpXI8vP4rLKYrzBCw9aPGk7eHvepP7tg= 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:hl4BVEjFlXFGfLA9hPqm9RHe28RE4g520YrsSk0E?= =?us-ascii?Q?lTNAtp9axKgYTt54M1chvvuWzcDoBen7mzNJ2oBb/7rrOQnswkgEyiXWomuv?= =?us-ascii?Q?gAzllFzRVzTrVBoSv7eWMnMqvgke7mXj/Dvh/Cz6m5ydY+kuL/L+fUUtUhWe?= =?us-ascii?Q?nDCcUoxfe9+K4x8X2RRBcB8gwWB/hzCR8G6L1Ma65u5lmc5yyZv/3yhQuVyC?= =?us-ascii?Q?zqU5ADP+kRZpvgfC+1nSiZ0HzWPPH0em8txJFIe/04aiOpL+kYkisgobbS+i?= =?us-ascii?Q?0PepS0uK4p8FL5+UdLElocHlox0fg1vAPtJEkvRubpYW7Io1b+XcURQmMwQ8?= =?us-ascii?Q?anzpKdeGAjdUqQc47HjbKZCVP/hQbXqKDVSU94wozjY7zK13oafnp7W3KLkq?= =?us-ascii?Q?qzjas50Zwnf+4u+u5ykvBJhMRWImwv5fVykLJaX5XGKlPn1wFcDN09SBsLQC?= =?us-ascii?Q?+WHqF0G9RCBo40uTj3hINz4AF3XDtQAsu5/+SyofUTV2Fya6vfzbRUblJZpA?= =?us-ascii?Q?CiJQdP8lJmH277AwDH1yjg3UqKeokSGDIlev8s0W68T/AR+fDBBDnhN/0zGj?= =?us-ascii?Q?9wrk79Nlf7tj4Hu6TmPpqb9r4SFcZtMZEz2W72tVZBOWwES5h9NLrbBCCGJi?= =?us-ascii?Q?ZplUiRyKFSd/4T/cyEBliuB4F2LyV6CkB3e7K3j/2Pzxt3ypXQeqZm7mFL93?= =?us-ascii?Q?7+JN6kw67kYM8+d1g+WQOeKW+GgbEgJ9uwdKXNPhyuvKb19sadpJWHgVC6D/?= =?us-ascii?Q?xOHZsD/pwYr932+zfreP7kzMGVwF++AtpY41wnK9SAHfO+M68uIXpju1NC3U?= =?us-ascii?Q?JSCsxp5eHhvZWAvPNEOrKb2uohOP+JSFhJiiZuel9/2Ucno+lofyUHnUsjeP?= =?us-ascii?Q?TCkiErG5hsYoL8c+pEuwx/xH6YIks6kpmQFI139pheDdxGUGIKjO2IYzy8KM?= =?us-ascii?Q?CVzo+NKC8piITkoCsyJ8+xgthWSHcWCmxCxpE80Bkrdoz5hrU+oei7E2JU9b?= =?us-ascii?Q?Q7CZRIqjDpyBP6O+3/HnOcy4fwYB/TTWPZwM+2f6eD/jtsQ2uC5ZFxTW3N4O?= =?us-ascii?Q?2EA7jI/uNC9lpaEnVmYWfOn4mQQFEgZIBxKkrI9ZjMZY6Z6I+rmbOded4YVZ?= =?us-ascii?Q?/3hDRfTNbddvUltfJ4EIO8d6z8/40w8Bz3uQymSroNcYPZJHaIIdlom2lu1F?= =?us-ascii?Q?jEYijygI1lQlKyDeIAmpuNejdDr1OQHvO+kykiqY+p7ICC9/wqNYmdzcVzfO?= =?us-ascii?Q?bG02VYp3Y8R/WHaR5c0=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:lNnJnZ0mipRj8usxfeRLa0vhG8IzTDoheAKZa0a?= =?us-ascii?Q?/vw7tVREWQChDvoJYhOj1pPk+fn2amZ1ywVHms13GAShVHa0Zi0qJroslkN+?= =?us-ascii?Q?gVIq5ywfWJdCt3TTZ8FcVMLP6VaYMgA8oseGZest1RGLDA7YXLA++rRKsxHA?= =?us-ascii?Q?Uoan3t57f8Hg4Kkx1+PQUsgoNo/9VsFrOmAOkGe93y7HQXCKKzlmnNyY0jBb?= =?us-ascii?Q?bMnb8JlF+5pjTawsZ6uyruBEzZg4KZAGSjQVzUIcn+qjgQ8BKvGmcpLHm494?= =?us-ascii?Q?H+sTTXAxcmEeJMZLRZkP4eBlXJZ0h5+dFdA/cpIhiSKR6T3SC5DgO3ADKrTr?= =?us-ascii?Q?AUp8YiIWtFzd8xXLIhVWEVVWYzovtftklKc4oUD5Nx49pP5TzbtY8fhFAvJc?= =?us-ascii?Q?3s1cda+JGRnY94pFcafKXfgdUAX2+xSJTujMd96xS7FZFa4sOsz8VXPb4kKu?= =?us-ascii?Q?Icpyd2G7298aleBWfEZk67IlcKX4nC8AfNXbypgnfjFhqQ9W4eNbt5dxAUmu?= =?us-ascii?Q?8a3NmZbn3ZINDSqvcRHN5jQnqURmLxHQzBqPquBQqPSyc3yj7Pmb/Wt0hgnh?= =?us-ascii?Q?8Dsgcg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wluXgZV7DgsBmwHCb45w95G12xdb13UfAZ61wLYxQYvDcIKkDeweltyk9pSnhp36AVtBRSqXjpYDX+ijiIQ5TcYpBCr4YlN+49lC0UgViPAeNouWu5ZUfMzacT13/7wQXlEdtmB7VG3VWrLGTFEWdbPoLrTZ9Amjw3YELvr1ptmMbkL/FQM3cseB9n43aELOHD2qujrbjWmsgRuUxYAchsDbTZZx1iJes0TzZmKt5iUA52Nhp0j1YVFoDY8OOmKA= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1985; 20:2EqIM1FAKnksrFjvJnzYpbFa3vWwEDlWXwBkzEJdhnLb/be+hU2xtv8RFLONsa+IMB/fKziCfmeF8tSP9U8c312UUvRPoZFfd7fGfu1J5YLogAQIzCcoE8sBseIuY3zMZVRQ2EaMvA8Xjbfp3mUVIUjfwLQU5PQ36ZR6kfJnnxU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 12:10:41.2141 (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.120 Subject: [Qemu-devel] [PATCH v6 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 This allows to change the port's backend runtime, e.g. change it from file to a socket making it possible to establish a debug session with WinDbg > qemu-system [..] -chardev file,id=charchannel2,path=/tmp/charchannel2 \ -device isa-serial,chardev=charchannel2,id=channel2 QEMU 2.9.50 monitor - type 'help' for more information (qemu) chardev-change charchannel2 \ socket,host=127.0.0.1,port=4242,server,nowait 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 | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index 09157f9..9aec6c6 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -891,6 +891,34 @@ 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_backend_connected(&s->chr)) { @@ -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);