From nobody Mon Feb 9 11:44:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1571916158; cv=none; d=zoho.com; s=zohoarc; b=B9iG8s35EXLimAZMBvOVxjxPP5KXU2UlzYGJaLkhM31QKd4qrjIJSdAVG/yUOvROxr3dwt1WwgUbyD3Uyths1ZzSF6VMeKEMRZSzYJEJocxwx/ZmhhJwfRYRkkPP0BC5aOyvucDQCn30wDIQghxlTm/+wM2ay0pp6ZmwdTlLBHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571916158; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=2Q/cmWeIRc1SHebJ+dlA8HdCfrEYFIIgUk1kTs8jfCI=; b=KdiAACuEZtDjOKsuB6iR2xpdeOXKJPk0hcPswYNVhm7aZUBCDKeC+S99qMkcXeofa8Z0Z9XY0VBcwO5jaeWaPBI/Pq78q/SKq9w3vyJaH3q2wGmdJFBLjldohg92f0nBu9nU72wOo21bq7gra4n5YdejpmZlITFZ30poXtTt1vI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157191615818061.329366453053694; Thu, 24 Oct 2019 04:22:38 -0700 (PDT) Received: from localhost ([::1]:36806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZa2-0006yX-6J for importer@patchew.org; Thu, 24 Oct 2019 05:38:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44140) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZ9r-0000Y2-LN for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNZ9p-0004vh-DS for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:51 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:60924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNZ9n-0004ro-8h for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:48 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O94M5P099569; Thu, 24 Oct 2019 09:11:40 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 2vqteq2ak1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:11:40 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O98LlY047154; Thu, 24 Oct 2019 09:11:40 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2vu0fnu8kv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:11:39 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x9O9Bba4012334; Thu, 24 Oct 2019 09:11:38 GMT Received: from jaraman-bur-1.us.oracle.com (/10.152.33.39) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Oct 2019 02:11:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references; s=corp-2019-08-05; bh=2Q/cmWeIRc1SHebJ+dlA8HdCfrEYFIIgUk1kTs8jfCI=; b=oXEVFY3RrYH8Vmge+yg0CIchF9Y63AfhCoyW8X8owGiLAJKmUu/Q8QhRp/WWyiMi7Mc8 nyfSov6kMtRVAfP0SCHXAyPZJscHIrcnlUiw1f2zEZjDGOv3UeFSq41jFTLfQ4zmtkBp 09ouygl/DptuuVwLL8tDT/xJuHx1yPs4W2wguwCdlBBSiX/oh8D0CTMYExnOy5jCOuaM VGRwGULlhHq/g+bnaMPoWLVqn4hs/R1aXi/+vYYEiDCGYbuLEkBk+eafnBarkpp5BGSB 8swzWMuRN+KUyVqq4f5t0SQUT/X+/jtaOcOj6vJeQHmXHUBtNaUk8swi1K4OtKnCdJy5 pA== From: Jagannathan Raman To: qemu-devel@nongnu.org Subject: [RFC v4 PATCH 40/49] multi-process/mig: build migration module in the remote process Date: Thu, 24 Oct 2019 05:09:21 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240089 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240089 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: elena.ufimtseva@oracle.com, fam@euphon.net, john.g.johnson@oracle.com, kraxel@redhat.com, jag.raman@oracle.com, quintela@redhat.com, mst@redhat.com, armbru@redhat.com, kanth.ghatraju@oracle.com, thuth@redhat.com, ehabkost@redhat.com, konrad.wilk@oracle.com, dgilbert@redhat.com, liran.alon@oracle.com, stefanha@redhat.com, rth@twiddle.net, kwolf@redhat.com, berrange@redhat.com, mreitz@redhat.com, ross.lagerwall@citrix.com, marcandre.lureau@gmail.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add Makefile support to enable migration in remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 Makefile.objs | 4 ++++ Makefile.target | 1 + migration/Makefile.objs | 12 +++++++++++- net/Makefile.objs | 2 ++ replay/Makefile.objs | 2 +- stubs/migration.c | 49 +++++++++++++++++++++++++++++++++++++++++++++= ++++ stubs/net-stub.c | 21 +++++++++++++++++++++ stubs/qapi-misc.c | 2 ++ stubs/replay.c | 8 ++++++++ stubs/vl-stub.c | 22 ++++++++++++++++++++++ vl-parse.c | 3 +++ vl.c | 2 -- 12 files changed, 124 insertions(+), 4 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index c72db88..ebb1938 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -79,6 +79,8 @@ common-obj-y +=3D qdev-monitor.o device-hotplug.o common-obj-$(CONFIG_WIN32) +=3D os-win32.o common-obj-$(CONFIG_POSIX) +=3D os-posix.o =20 +remote-pci-obj-$(CONFIG_POSIX) +=3D os-posix.o + common-obj-$(CONFIG_LINUX) +=3D fsdev/ =20 common-obj-y +=3D migration/ @@ -110,6 +112,8 @@ common-obj-$(CONFIG_FDT) +=3D device_tree.o =20 common-obj-y +=3D vl-parse.o =20 +remote-pci-obj-$(CONFIG_MPQEMU) +=3D net/ + ###################################################################### # qapi =20 diff --git a/Makefile.target b/Makefile.target index 8010998..b60a837 100644 --- a/Makefile.target +++ b/Makefile.target @@ -225,6 +225,7 @@ all-remote-pci-obj-y +=3D memory.o all-remote-pci-obj-y +=3D exec.o all-remote-pci-obj-y +=3D ioport.o all-remote-pci-obj-y +=3D cpus.o +all-remote-pci-obj-y +=3D migration/ram.o =20 remote-pci-obj-y :=3D remote-lsi-obj-y :=3D diff --git a/migration/Makefile.objs b/migration/Makefile.objs index 016b6ab..c9682c6 100644 --- a/migration/Makefile.objs +++ b/migration/Makefile.objs @@ -14,4 +14,14 @@ common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) +=3D block.o =20 rdma.o-libs :=3D $(RDMA_LIBS) =20 -remote-pci-obj-$(CONFIG_MPQEMU) +=3D qemu-file.o vmstate.o qjson.o vmstate= -types.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D migration.o socket.o fd.o exec.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D tls.o channel.o savevm.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D colo.o colo-failover.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D vmstate.o vmstate-types.o page_cache.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qemu-file.o global_state.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qemu-file-channel.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D xbzrle.o postcopy-ram.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D qjson.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D block-dirty-bitmap.o +remote-pci-obj-$(CONFIG_RDMA) +=3D rdma.o +remote-pci-obj-$(CONFIG_MPQEMU) +=3D block.o diff --git a/net/Makefile.objs b/net/Makefile.objs index c5d076d..a8ad986 100644 --- a/net/Makefile.objs +++ b/net/Makefile.objs @@ -30,3 +30,5 @@ common-obj-$(CONFIG_WIN32) +=3D tap-win32.o vde.o-libs =3D $(VDE_LIBS) =20 common-obj-$(CONFIG_CAN_BUS) +=3D can/ + +remote-pci-obj-$(CONFIG_MPQEMU) +=3D announce.o diff --git a/replay/Makefile.objs b/replay/Makefile.objs index cee6539..c64b968 100644 --- a/replay/Makefile.objs +++ b/replay/Makefile.objs @@ -6,4 +6,4 @@ common-obj-y +=3D replay-input.o common-obj-y +=3D replay-char.o common-obj-y +=3D replay-snapshot.o common-obj-y +=3D replay-net.o -common-obj-y +=3D replay-audio.o \ No newline at end of file +common-obj-y +=3D replay-audio.o diff --git a/stubs/migration.c b/stubs/migration.c index 28ccf80..dbd12db 100644 --- a/stubs/migration.c +++ b/stubs/migration.c @@ -6,6 +6,35 @@ #include "qapi/qapi-types-migration.h" #include "qapi/qapi-commands-migration.h" #include "qapi/qapi-types-net.h" +#include "net/filter.h" +#include "net/colo-compare.h" + +#pragma weak qmp_query_migrate_capabilities +#pragma weak qmp_query_migrate_parameters +#pragma weak migrate_announce_params +#pragma weak qmp_query_migrate +#pragma weak qmp_migrate_set_capabilities +#pragma weak qmp_migrate_set_parameters +#pragma weak qmp_migrate_incoming +#pragma weak qmp_migrate_recover +#pragma weak qmp_migrate_pause +#pragma weak qmp_migrate +#pragma weak qmp_migrate_cancel +#pragma weak qmp_migrate_continue +#pragma weak qmp_migrate_set_cache_size +#pragma weak qmp_query_migrate_cache_size +#pragma weak qmp_migrate_set_speed +#pragma weak qmp_migrate_set_downtime +#pragma weak qmp_migrate_start_postcopy +#pragma weak migration_global_dump +#pragma weak save_snapshot +#pragma weak qmp_xen_save_devices_state +#pragma weak load_snapshot +#pragma weak qmp_xen_set_replication +#pragma weak qmp_query_xen_replication_status +#pragma weak qmp_xen_colo_do_checkpoint +#pragma weak qmp_query_colo_status +#pragma weak qmp_x_colo_lost_heartbeat =20 MigrationInfo *qmp_query_migrate(Error **errp) { @@ -160,3 +189,23 @@ AnnounceParameters *migrate_announce_params(void) =20 return NULL; } + +void colo_notify_filters_event(int event, Error **errp) +{ + qemu_debug_assert(0); +} + +void colo_notify_compares_event(void *opaque, int event, Error **errp) +{ + qemu_debug_assert(0); +} + +void colo_compare_register_notifier(Notifier *notify) +{ + qemu_debug_assert(0); +} + +void colo_compare_unregister_notifier(Notifier *notify) +{ + qemu_debug_assert(0); +} diff --git a/stubs/net-stub.c b/stubs/net-stub.c index 962827e..ddfd1e4 100644 --- a/stubs/net-stub.c +++ b/stubs/net-stub.c @@ -5,6 +5,8 @@ #include "qapi/qapi-commands-net.h" #include "qapi/qapi-commands-rocker.h" =20 +#pragma weak qmp_announce_self + int qemu_find_net_clients_except(const char *id, NetClientState **ncs, NetClientDriver type, int max) { @@ -98,3 +100,22 @@ void netdev_add(QemuOpts *opts, Error **errp) { qemu_debug_assert(0); } + +NetClientState *qemu_get_queue(NICState *nic) +{ + qemu_debug_assert(0); + + return NULL; +} + +ssize_t qemu_send_packet_raw(NetClientState *nc, const uint8_t *buf, int s= ize) +{ + qemu_debug_assert(0); + + return 0; +} + +void qemu_foreach_nic(qemu_nic_foreach func, void *opaque) +{ + qemu_debug_assert(0); +} diff --git a/stubs/qapi-misc.c b/stubs/qapi-misc.c index 3eeedd9..824eac1 100644 --- a/stubs/qapi-misc.c +++ b/stubs/qapi-misc.c @@ -5,6 +5,8 @@ #include "./qapi/qapi-types-dump.h" #include "qapi/qapi-commands-dump.h" =20 +#pragma weak qmp_xen_load_devices_state + void qmp_dump_guest_memory(bool paging, const char *file, bool has_detach, bool detach, bool has_begin, int64_t begin, bool has_length, diff --git a/stubs/replay.c b/stubs/replay.c index 4a966ff..6fcd995 100644 --- a/stubs/replay.c +++ b/stubs/replay.c @@ -1,4 +1,5 @@ #include "qemu/osdep.h" +#include "qemu-common.h" #include "sysemu/replay.h" =20 ReplayMode replay_mode; @@ -97,3 +98,10 @@ void replay_account_executed_instructions(void) void replay_add_blocker(Error *reason) { } + +bool replay_can_snapshot(void) +{ + qemu_debug_assert(0); + + return false; +} diff --git a/stubs/vl-stub.c b/stubs/vl-stub.c index 606f078..460d1f3 100644 --- a/stubs/vl-stub.c +++ b/stubs/vl-stub.c @@ -169,3 +169,25 @@ int wav_start_capture(AudioState *state, CaptureState = *s, const char *path, =20 return -1; } + +void qemu_system_killed(int signal, pid_t pid) +{ + qemu_debug_assert(0); +} + +void qemu_system_reset(ShutdownCause reason) +{ + qemu_debug_assert(0); +} + +bool runstate_store(char *str, size_t size) +{ + qemu_debug_assert(0); + + return false; +} + +void qemu_add_exit_notifier(Notifier *notify) +{ + qemu_debug_assert(0); +} diff --git a/vl-parse.c b/vl-parse.c index 011a9ef..1c8ecbe 100644 --- a/vl-parse.c +++ b/vl-parse.c @@ -41,6 +41,9 @@ =20 #include "vl.h" =20 +int only_migratable; /* turn it off unless user states otherwise */ +bool enable_mlock; + /***********************************************************/ /* QEMU Block devices */ =20 diff --git a/vl.c b/vl.c index a6a0db8..8a26d81 100644 --- a/vl.c +++ b/vl.c @@ -148,7 +148,6 @@ const char* keyboard_layout =3D NULL; ram_addr_t ram_size; const char *mem_path =3D NULL; int mem_prealloc =3D 0; /* force preallocation of physical target memory */ -bool enable_mlock =3D false; bool enable_cpu_pm =3D false; int nb_nics; NICInfo nd_table[MAX_NICS]; @@ -189,7 +188,6 @@ const char *prom_envs[MAX_PROM_ENVS]; int boot_menu; bool boot_strict; uint8_t *boot_splash_filedata; -int only_migratable; /* turn it off unless user states otherwise */ bool wakeup_suspend_enabled; =20 int icount_align_option; --=20 1.8.3.1