From patchwork Tue Jan 18 16:09:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12716676 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08CA6C433EF for ; Tue, 18 Jan 2022 16:20:37 +0000 (UTC) Received: from localhost ([::1]:56616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9rDn-0001nt-Mi for qemu-devel@archiver.kernel.org; Tue, 18 Jan 2022 11:20:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9r35-0003P9-7C for qemu-devel@nongnu.org; Tue, 18 Jan 2022 11:09:31 -0500 Received: from mail-eopbgr40114.outbound.protection.outlook.com ([40.107.4.114]:1927 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9r32-0000Oj-JM for qemu-devel@nongnu.org; Tue, 18 Jan 2022 11:09:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/3WPi2S1INMRXwuJuo+M16E6SpiWXNiKV90penV046xuW0bIO0+eBskJ35/pNP2K+13u92HWsThkpFcurasLf9B4F6k9IDLcVcg3AVL+5foZdm46Ates/XefSvRURC9UKizpqpEC7D95m0TidKjTjsJCidYVpwNIbpRJRpZqVEXRfyjtO+eQLT9ynH3AQLAMFLauFN11zDWckZHP0colHVqi+/6DUFKceRdQ/LzS8K2qvGfEMZkxA2+aHrlLv0cZgr8P3hOnJ7+T6jzfwGAQ9K1TFmSxXXF/o6XHHOer89VFvg0HVpUNGn9ZtRLuUe6XOwETh7W1BxGqk98TNspQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lePoJ4+aOZF/JQDTCxH3HBAHufnsvvdD53N3Hu1GGI0=; b=Gnk7FJ/oIYMmLHCS7Ifn0WkVswbDPaR6TDnWQF+9DFxaU6s0+49SzCudj88qZfFL/VmtMGo5NOY2Q8ZYFIXvHiQLhnrgrfJuBOB5wmgOiWHm+Fi2LIrKinyAxuKwvo+OMdJU6xdq5RfS/7OSPr2Z/IMHwj+uYquCTKH9cxCtmw8cSGJ6b3IOFj2l3yCxCSE4YQ6IXiYG3dg+mthctuYzKjhn6HtKKJR60vQev7FACYfwCTc/NFUY86peZF/whh8ajt7d+nFL8NnS4TKhQmQpvKnFd1/LFkeI5zlsTTVqM6QHw19a0Apmw2nPMkRgz8W2xV6Fy8gy9C6nrvijLfuqCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lePoJ4+aOZF/JQDTCxH3HBAHufnsvvdD53N3Hu1GGI0=; b=URXg2R2sZKdiHcUyXXAkj8ISLdwWvE3c+TzSkY0Qh2VqPzPTCdGcmFw7tExZWz8hq4erDEfa/j/pJODK8Ckr2g0rV0x5o3kQgf5Q2JwxSr4Lb2WlWtsfMR3qeeEVUtp8uIXs6t/kl8VKeBwOW7Ukfv8p28UCUCiIJqAUP/cvAr0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) by AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Tue, 18 Jan 2022 16:09:25 +0000 Received: from AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::b435:c0de:ef6b:5917]) by AM9PR08MB6737.eurprd08.prod.outlook.com ([fe80::b435:c0de:ef6b:5917%7]) with mapi id 15.20.4888.014; Tue, 18 Jan 2022 16:09:25 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: bleal@redhat.com, wainersm@redhat.com, f4bug@amsat.org, crosa@redhat.com, eblake@redhat.com, armbru@redhat.com, kraxel@redhat.com, berrange@redhat.com, vsementsov@virtuozzo.com, marcandre.lureau@redhat.com Subject: [PATCH v3 0/3] qapi/ui: change vnc addresses Date: Tue, 18 Jan 2022 17:09:06 +0100 Message-Id: <20220118160909.2502374-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: AM7PR03CA0006.eurprd03.prod.outlook.com (2603:10a6:20b:130::16) To AM9PR08MB6737.eurprd08.prod.outlook.com (2603:10a6:20b:304::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 584c068f-5da1-4741-afee-08d9da9ce583 X-MS-TrafficTypeDiagnostic: AM9PR08MB6737:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N8Jqg/kxTUcGRFrKymYSg8nA484n98P//CVOtfbgw4ImhZgw/5/33uGmu0IwuVMQ4IdE36FVxk4nbkH0gv6N4Zk2dI46ErsHRC0y/DpKrAX13u9EJAcmVmuK7GJB3A/5FdaF3BzuEA08i13QY6X11FbYAf+EaNF1LmbWFzfTBQqS2u+hH1dMGnZSBZlw6uFOs/JTR7CAfWiKq5JOZT2X/iVzXPVUhY1GiBcfbfICaZNfpgnTz19nVZSxMaZWCvzye0bg9v5xMkuftSoBNb2dzvMcP3RYU8yfsUelPUV8lxTo9Md36CCNn4Ehl88HbjcgiPNMk9LOQ0qC6wF9T668ZhXaspRMpz5yzg0c/wYKBJPR6vaejg3lK/YOTp9x/K6QWVNMycqbQGyc+62oHzTmg7gIdre+iV5M1/4okB+S9jzyu16P29si5mM2pq64kOvK8N7KD8EEoDPv0h2XPTMPqI7ubjwO6zIr79iVfE3C4HZXWTLyYzQId9lyVIkN+WUIbBlhJQrGQSE8pM5gr8Dcja/gFVdz+jGYP0ew+IN7RL+Z7PiwBpkZViY541tYIb1Kx3ZDsO96XKhMeSu9SsbTcacKOwvSR0OqXoE9QhbK2YF5R4OID6ff5TogKeOeHVw54iZYoMgr74XWzc84ka3++kpuDA+ejJKA0HwxiTVj5zbczEBb7PtWGxY7idnButznQzoRf0f9otQh8xLJhfLaEQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR08MB6737.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(38100700002)(508600001)(6666004)(6916009)(38350700002)(1076003)(2616005)(36756003)(26005)(2906002)(186003)(6486002)(6506007)(66556008)(66476007)(66946007)(8676002)(316002)(52116002)(83380400001)(7416002)(6512007)(8936002)(4326008)(5660300002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Message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THtdhc5+EHLTlb6vKGSKZJRzIvwlYfXo622GJu?= =?utf-8?q?HwSoTLCH76piJHYPlkKzZjwfF+zp04lm0b0197eLHIu48XbZrfViVB7k6cl+eUIwB?= =?utf-8?q?UERntdLMx3aqoyUzoVuqATuxwMteBuOPIxOfuzJrTKyaFLckVBYvahoL4CPOfPKZf?= =?utf-8?q?6AOuNwzeNLYhUCdl3jrDEBGDXwVPn5RablnqFF54kS4GA633JKwuub1WCp9ik52se?= =?utf-8?q?XHnzSigDltZxgGYR/7duVmO/2KNPOCBu5WOkQCJzkOkzTwPetJ9oQPwOyT20rmhCN?= =?utf-8?q?FboOShWT5bv3O1DUX9Er4BM7W16sGbjEJAJ0X2CHhnMuusaErPogIDVN1Roqrpba0?= =?utf-8?q?gkJyNatZyCiVaSxnhD61dcZ2uUWnQMKpGN8YWi6IY5ZONIAFn4ZxcPpEuTyvhhjGa?= =?utf-8?q?M0oSjxU6LxHY7InYtaCNuPsdpc/5mRwzsu23AYq8muL4rmXXKrx7Rs06KRxXVWl1b?= =?utf-8?q?a9CzAp6C0Ohrb+RC224Dtd/sYbjwrTfAj3rWQR64Myow5zykJptaIw97w0ciCeIDo?= =?utf-8?q?vlTWwzQ37fn248dLfvq1XQf8Qkl8pHQqrX/H22VVkVD+s+FoJ/kO/zX9QRYr2Tyve?= =?utf-8?q?f0qhRJnKDaxHF9CH4ReSFxtD60LQeZtOEoxO4mVPHePXC2v4S69E/ZfbH6B4BNdP1?= =?utf-8?q?2ajaLf16ZgXxfX0lQ7IfxqyfBSCZXFCvrK/IdpGIMVH22rchQDigrXKyOK3DS+dlo?= =?utf-8?q?MbmV+CWK9IrMGI5GbyWwVDc2rbGfc6LeQ=3D=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 584c068f-5da1-4741-afee-08d9da9ce583 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6737.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 16:09:25.4703 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hdLt/14ZIn4HzyE1RbY+ztEA+J8lzlJn4nGQMY/BUbqXcCRg1xRpYQ8UtDkFXLRiByqI3TmQd1ZLIW1E9H2z0/u1i5zoNPLzi9QujIHHiR8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6737 Received-SPF: pass client-ip=40.107.4.114; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi all! v3: - instead of creating new qmp command add an argument to existing display-reload - also don't touch websockets for now. I'm not sure we need it. Additional argument for changing websockets may be added later on demand Recently our customer requested a possibility to change VNC listen port dynamically. Happily in Rhel7-based Qemu we already have this possibility: through deprecated "change" qmp command. But since 6.0 "change" qmp command was removed, with recommendation to use change-vnc-password or blockdev-change-medium instead. Of course, neither of them allow change VNC listen port. So, let's reimplement the possibility. Note: now, reconnecting may trigger existing deadlock, as I described in my message "Re: [PULL 09/11] ui/vnc: clipboard support": <973ddebe-14a9-4ba7-c389-7a97d6017237@virtuozzo.com> Simple hack helps, but I'm not sure it's safe itself: diff --git a/ui/vnc.c b/ui/vnc.c index 69bbf3b6f6..8c6b378e2e 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1354,12 +1354,12 @@ void vnc_disconnect_finish(VncState *vs) /* last client gone */ vnc_update_server_surface(vs->vd); } + vnc_unlock_output(vs); + if (vs->cbpeer.update.notify) { qemu_clipboard_peer_unregister(&vs->cbpeer); } - vnc_unlock_output(vs); - qemu_mutex_destroy(&vs->output_mutex); if (vs->bh != NULL) { qemu_bh_delete(vs->bh); Vladimir Sementsov-Ogievskiy (3): ui/vnc: refactor arrays of addresses to SocketAddressList qapi/ui: display-reload: add possibility to change listen address avocado/vnc: add test_change_listen docs/about/removed-features.rst | 3 +- qapi/ui.json | 6 +- include/ui/console.h | 2 +- monitor/qmp-cmds.c | 4 +- ui/vnc.c | 166 ++++++++++++++++---------------- tests/avocado/vnc.py | 10 ++ 6 files changed, 100 insertions(+), 91 deletions(-)