From patchwork Fri Dec 30 09:27:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dengpc12@chinatelecom.cn X-Patchwork-Id: 13084423 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 68940C4167B for ; Fri, 30 Dec 2022 14:47:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBGeI-0003h0-AH; Fri, 30 Dec 2022 09:46:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBBpH-0000Q0-P0 for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:19 -0500 Received: from prt-mail.chinatelecom.cn ([42.123.76.220] helo=chinatelecom.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBBpF-0000zH-FM for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:19 -0500 HMM_SOURCE_IP: 172.18.0.188:50172.2056949848 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-171.221.141.170 (unknown [172.18.0.188]) by chinatelecom.cn (HERMES) with SMTP id 1F878280094; Fri, 30 Dec 2022 17:28:10 +0800 (CST) X-189-SAVE-TO-SEND: +dengpc12@chinatelecom.cn Received: from ([171.221.141.170]) by app0023 with ESMTP id 1114d16433494f348e07b60204d608ee for qemu-devel@nongnu.org; Fri, 30 Dec 2022 17:28:12 CST X-Transaction-ID: 1114d16433494f348e07b60204d608ee X-Real-From: dengpc12@chinatelecom.cn X-Receive-IP: 171.221.141.170 X-MEDUSA-Status: 0 From: dengpc12@chinatelecom.cn To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, huangy81@chinatelecom.cn, liuym16@chinatelecom.cn, kraxel@redhat.com, "dengpc12@chinatelecom.cn" Subject: [PATCH RFC 1/4] vdagent: fix memory leak when vdagent_disconnect is called Date: Fri, 30 Dec 2022 17:27:55 +0800 Message-Id: <20221230092758.281805-2-dengpc12@chinatelecom.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221230092758.281805-1-dengpc12@chinatelecom.cn> References: <20221230092758.281805-1-dengpc12@chinatelecom.cn> MIME-Version: 1.0 Received-SPF: pass client-ip=42.123.76.220; envelope-from=dengpc12@chinatelecom.cn; helo=chinatelecom.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 30 Dec 2022 09:46:08 -0500 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-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: "dengpc12@chinatelecom.cn" Memory free should be done in vdagent_disconnect using qemu_input_handler_unregister, replace qemu_input_handler_deactivate with that. Signed-off-by: dengpc12@chinatelecom.cn Signed-off-by: liuym16@chinatelecom.cn --- ui/vdagent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 4bf50f0c4d..645383b4ec 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -863,7 +863,7 @@ static void vdagent_disconnect(VDAgentChardev *vd) vdagent_reset_bufs(vd); vd->caps = 0; if (vd->mouse_hs) { - qemu_input_handler_deactivate(vd->mouse_hs); + qemu_input_handler_unregister(vd->mouse_hs); } if (vd->cbpeer.notifier.notify) { qemu_clipboard_peer_unregister(&vd->cbpeer); From patchwork Fri Dec 30 09:27:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: dengpc12@chinatelecom.cn X-Patchwork-Id: 13084425 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 78800C4167B for ; Fri, 30 Dec 2022 14:47:39 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBGeT-0003jH-Ec; Fri, 30 Dec 2022 09:46:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBBpJ-0000QV-7u for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:21 -0500 Received: from prt-mail.chinatelecom.cn ([42.123.76.220] helo=chinatelecom.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBBpF-0000zN-MS for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:20 -0500 HMM_SOURCE_IP: 172.18.0.188:50172.2056949848 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-171.221.141.170 (unknown [172.18.0.188]) by chinatelecom.cn (HERMES) with SMTP id 9B5B22800B0; Fri, 30 Dec 2022 17:28:12 +0800 (CST) X-189-SAVE-TO-SEND: +dengpc12@chinatelecom.cn Received: from ([171.221.141.170]) by app0023 with ESMTP id 779ea4cbe6714e9fb7371c7126b077fa for qemu-devel@nongnu.org; Fri, 30 Dec 2022 17:28:14 CST X-Transaction-ID: 779ea4cbe6714e9fb7371c7126b077fa X-Real-From: dengpc12@chinatelecom.cn X-Receive-IP: 171.221.141.170 X-MEDUSA-Status: 0 From: dengpc12@chinatelecom.cn To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, huangy81@chinatelecom.cn, liuym16@chinatelecom.cn, kraxel@redhat.com, "dengpc12@chinatelecom.cn" Subject: [PATCH RFC 2/4] vdagent: refactor vdagent_chr_recv_caps function Date: Fri, 30 Dec 2022 17:27:56 +0800 Message-Id: <20221230092758.281805-3-dengpc12@chinatelecom.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221230092758.281805-1-dengpc12@chinatelecom.cn> References: <20221230092758.281805-1-dengpc12@chinatelecom.cn> MIME-Version: 1.0 Received-SPF: pass client-ip=42.123.76.220; envelope-from=dengpc12@chinatelecom.cn; helo=chinatelecom.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 30 Dec 2022 09:46:08 -0500 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-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: "dengpc12@chinatelecom.cn" Abstract vdagent registry logic into vdagent_register_to_qemu_clipboard. Note that trace log of vdagent_recv_caps also be added. Signed-off-by: dengpc12@chinatelecom.cn Signed-off-by: liuym16@chinatelecom.cn Reviewed-by: Marc-André Lureau --- ui/trace-events | 1 + ui/vdagent.c | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ui/trace-events b/ui/trace-events index 977577fbba..5e50b60da5 100644 --- a/ui/trace-events +++ b/ui/trace-events @@ -143,6 +143,7 @@ vdagent_cb_grab_selection(const char *name) "selection %s" vdagent_cb_grab_discard(const char *name, int cur, int recv) "selection %s, cur:%d recv:%d" vdagent_cb_grab_type(const char *name) "type %s" vdagent_cb_serial_discard(uint32_t current, uint32_t received) "current=%u, received=%u" +vdagent_recv_caps(uint32_t caps) "received caps %u" # dbus.c dbus_registered_listener(const char *bus_name) "peer %s" diff --git a/ui/vdagent.c b/ui/vdagent.c index 645383b4ec..38061d5b38 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -696,6 +696,16 @@ static void vdagent_chr_open(Chardev *chr, *be_opened = true; } +static void vdagent_register_to_qemu_clipboard(VDAgentChardev *vd) +{ + if (have_clipboard(vd) && vd->cbpeer.notifier.notify == NULL) { + vd->cbpeer.name = "vdagent"; + vd->cbpeer.notifier.notify = vdagent_clipboard_notify; + vd->cbpeer.request = vdagent_clipboard_request; + qemu_clipboard_peer_register(&vd->cbpeer); + } +} + static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg) { VDAgentAnnounceCapabilities *caps = (void *)msg->data; @@ -720,14 +730,10 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg) qemu_input_handler_activate(vd->mouse_hs); } - memset(vd->last_serial, 0, sizeof(vd->last_serial)); + trace_vdagent_recv_caps(vd->caps); - if (have_clipboard(vd) && vd->cbpeer.notifier.notify == NULL) { - vd->cbpeer.name = "vdagent"; - vd->cbpeer.notifier.notify = vdagent_clipboard_notify; - vd->cbpeer.request = vdagent_clipboard_request; - qemu_clipboard_peer_register(&vd->cbpeer); - } + memset(vd->last_serial, 0, sizeof(vd->last_serial)); + vdagent_register_to_qemu_clipboard(vd); } static void vdagent_chr_recv_msg(VDAgentChardev *vd, VDAgentMessage *msg) From patchwork Fri Dec 30 09:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dengpc12@chinatelecom.cn X-Patchwork-Id: 13084422 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 70AFEC4167B for ; Fri, 30 Dec 2022 14:47:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBGeU-0003kG-6l; Fri, 30 Dec 2022 09:46:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBBpJ-0000QQ-7i for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:21 -0500 Received: from prt-mail.chinatelecom.cn ([42.123.76.220] helo=chinatelecom.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBBpF-0000zL-Gh for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:20 -0500 HMM_SOURCE_IP: 172.18.0.188:50172.2056949848 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-171.221.141.170 (unknown [172.18.0.188]) by chinatelecom.cn (HERMES) with SMTP id A38F52800AE; Fri, 30 Dec 2022 17:28:14 +0800 (CST) X-189-SAVE-TO-SEND: +dengpc12@chinatelecom.cn Received: from ([171.221.141.170]) by app0023 with ESMTP id 926be932422e424e8237a8728e802016 for qemu-devel@nongnu.org; Fri, 30 Dec 2022 17:28:16 CST X-Transaction-ID: 926be932422e424e8237a8728e802016 X-Real-From: dengpc12@chinatelecom.cn X-Receive-IP: 171.221.141.170 X-MEDUSA-Status: 0 From: dengpc12@chinatelecom.cn To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, huangy81@chinatelecom.cn, liuym16@chinatelecom.cn, kraxel@redhat.com, "dengpc12@chinatelecom.cn" Subject: [PATCH RFC 3/4] vdagent: add live migration support Date: Fri, 30 Dec 2022 17:27:57 +0800 Message-Id: <20221230092758.281805-4-dengpc12@chinatelecom.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221230092758.281805-1-dengpc12@chinatelecom.cn> References: <20221230092758.281805-1-dengpc12@chinatelecom.cn> MIME-Version: 1.0 Received-SPF: pass client-ip=42.123.76.220; envelope-from=dengpc12@chinatelecom.cn; helo=chinatelecom.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 30 Dec 2022 09:46:09 -0500 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-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: "dengpc12@chinatelecom.cn" To support live migration, we made the following 2 modifications: 1. save the caps field of VDAgentChardev. 2. register vdagent to qemu-clipboard after vm device state being reloaded during live migration. Signed-off-by: dengpc12@chinatelecom.cn Signed-off-by: liuym16@chinatelecom.cn --- ui/trace-events | 1 + ui/vdagent.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/ui/trace-events b/ui/trace-events index 5e50b60da5..ccacd867d1 100644 --- a/ui/trace-events +++ b/ui/trace-events @@ -144,6 +144,7 @@ vdagent_cb_grab_discard(const char *name, int cur, int recv) "selection %s, cur: vdagent_cb_grab_type(const char *name) "type %s" vdagent_cb_serial_discard(uint32_t current, uint32_t received) "current=%u, received=%u" vdagent_recv_caps(uint32_t caps) "received caps %u" +vdagent_migration_caps(uint32_t caps) "migrated caps %u" # dbus.c dbus_registered_listener(const char *bus_name) "peer %s" diff --git a/ui/vdagent.c b/ui/vdagent.c index 38061d5b38..1193abe348 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -6,6 +6,7 @@ #include "qemu/units.h" #include "hw/qdev-core.h" #include "migration/blocker.h" +#include "migration/vmstate.h" #include "ui/clipboard.h" #include "ui/console.h" #include "ui/input.h" @@ -906,6 +907,31 @@ static void vdagent_chr_parse(QemuOpts *opts, ChardevBackend *backend, /* ------------------------------------------------------------------ */ +static int vdagent_post_load(void *opaque, int version_id) +{ + VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(opaque); + + trace_vdagent_migration_caps(vd->caps); + + if (vd->caps) { + vdagent_register_to_qemu_clipboard(vd); + qemu_input_handler_activate(vd->mouse_hs); + } + + return 0; +} + +static const VMStateDescription vmstate_vdagent = { + .name = "vdagent", + .version_id = 1, + .minimum_version_id = 1, + .post_load = vdagent_post_load, + .fields = (VMStateField[]) { + VMSTATE_UINT32(caps, VDAgentChardev), + VMSTATE_END_OF_LIST() + }, +}; + static void vdagent_chr_class_init(ObjectClass *oc, void *data) { ChardevClass *cc = CHARDEV_CLASS(oc); @@ -922,6 +948,8 @@ static void vdagent_chr_init(Object *obj) VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj); buffer_init(&vd->outbuf, "vdagent-outbuf"); + + vmstate_register(NULL, 0, &vmstate_vdagent, vd); error_setg(&vd->migration_blocker, "The vdagent chardev doesn't yet support migration"); } From patchwork Fri Dec 30 09:27:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dengpc12@chinatelecom.cn X-Patchwork-Id: 13084426 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 19F7EC4167B for ; Fri, 30 Dec 2022 14:47:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBGeT-0003jr-Im; Fri, 30 Dec 2022 09:46:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBBpH-0000Q1-PJ for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:19 -0500 Received: from prt-mail.chinatelecom.cn ([42.123.76.220] helo=chinatelecom.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBBpF-0000zI-FJ for qemu-devel@nongnu.org; Fri, 30 Dec 2022 04:37:19 -0500 HMM_SOURCE_IP: 172.18.0.188:50172.2056949848 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-171.221.141.170 (unknown [172.18.0.188]) by chinatelecom.cn (HERMES) with SMTP id 57CE12800B6; Fri, 30 Dec 2022 17:28:16 +0800 (CST) X-189-SAVE-TO-SEND: +dengpc12@chinatelecom.cn Received: from ([171.221.141.170]) by app0023 with ESMTP id 7075f3dd428d45fea751d59a434975a7 for qemu-devel@nongnu.org; Fri, 30 Dec 2022 17:28:19 CST X-Transaction-ID: 7075f3dd428d45fea751d59a434975a7 X-Real-From: dengpc12@chinatelecom.cn X-Receive-IP: 171.221.141.170 X-MEDUSA-Status: 0 From: dengpc12@chinatelecom.cn To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, huangy81@chinatelecom.cn, liuym16@chinatelecom.cn, kraxel@redhat.com, "dengpc12@chinatelecom.cn" Subject: [PATCH RFC 4/4] vdagent: remove migration blocker Date: Fri, 30 Dec 2022 17:27:58 +0800 Message-Id: <20221230092758.281805-5-dengpc12@chinatelecom.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221230092758.281805-1-dengpc12@chinatelecom.cn> References: <20221230092758.281805-1-dengpc12@chinatelecom.cn> MIME-Version: 1.0 Received-SPF: pass client-ip=42.123.76.220; envelope-from=dengpc12@chinatelecom.cn; helo=chinatelecom.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 30 Dec 2022 09:46:08 -0500 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-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: "dengpc12@chinatelecom.cn" Now that migration already be supported, so remove the blocker. Signed-off-by: dengpc12@chinatelecom.cn Signed-off-by: liuym16@chinatelecom.cn --- ui/vdagent.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 1193abe348..f0a7fd5093 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -5,7 +5,6 @@ #include "qemu/option.h" #include "qemu/units.h" #include "hw/qdev-core.h" -#include "migration/blocker.h" #include "migration/vmstate.h" #include "ui/clipboard.h" #include "ui/console.h" @@ -32,9 +31,6 @@ struct VDAgentChardev { Chardev parent; - /* TODO: migration isn't yet supported */ - Error *migration_blocker; - /* config */ bool mouse; bool clipboard; @@ -675,10 +671,6 @@ static void vdagent_chr_open(Chardev *chr, return; #endif - if (migrate_add_blocker(vd->migration_blocker, errp) != 0) { - return; - } - vd->mouse = VDAGENT_MOUSE_DEFAULT; if (cfg->has_mouse) { vd->mouse = cfg->mouse; @@ -950,18 +942,14 @@ static void vdagent_chr_init(Object *obj) buffer_init(&vd->outbuf, "vdagent-outbuf"); vmstate_register(NULL, 0, &vmstate_vdagent, vd); - error_setg(&vd->migration_blocker, - "The vdagent chardev doesn't yet support migration"); } static void vdagent_chr_fini(Object *obj) { VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(obj); - migrate_del_blocker(vd->migration_blocker); vdagent_disconnect(vd); buffer_free(&vd->outbuf); - error_free(vd->migration_blocker); } static const TypeInfo vdagent_chr_type_info = {