[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v4 PATCH 40/49] multi-process/mig: build migration module in the re
From: |
Jagannathan Raman |
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 |
Add Makefile support to enable migration in remote process
Signed-off-by: Elena Ufimtseva <address@hidden>
Signed-off-by: John G Johnson <address@hidden>
Signed-off-by: Jagannathan Raman <address@hidden>
---
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 += qdev-monitor.o device-hotplug.o
common-obj-$(CONFIG_WIN32) += os-win32.o
common-obj-$(CONFIG_POSIX) += os-posix.o
+remote-pci-obj-$(CONFIG_POSIX) += os-posix.o
+
common-obj-$(CONFIG_LINUX) += fsdev/
common-obj-y += migration/
@@ -110,6 +112,8 @@ common-obj-$(CONFIG_FDT) += device_tree.o
common-obj-y += vl-parse.o
+remote-pci-obj-$(CONFIG_MPQEMU) += net/
+
######################################################################
# qapi
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 += memory.o
all-remote-pci-obj-y += exec.o
all-remote-pci-obj-y += ioport.o
all-remote-pci-obj-y += cpus.o
+all-remote-pci-obj-y += migration/ram.o
remote-pci-obj-y :=
remote-lsi-obj-y :=
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) += block.o
rdma.o-libs := $(RDMA_LIBS)
-remote-pci-obj-$(CONFIG_MPQEMU) += qemu-file.o vmstate.o qjson.o
vmstate-types.o
+remote-pci-obj-$(CONFIG_MPQEMU) += migration.o socket.o fd.o exec.o
+remote-pci-obj-$(CONFIG_MPQEMU) += tls.o channel.o savevm.o
+remote-pci-obj-$(CONFIG_MPQEMU) += colo.o colo-failover.o
+remote-pci-obj-$(CONFIG_MPQEMU) += vmstate.o vmstate-types.o page_cache.o
+remote-pci-obj-$(CONFIG_MPQEMU) += qemu-file.o global_state.o
+remote-pci-obj-$(CONFIG_MPQEMU) += qemu-file-channel.o
+remote-pci-obj-$(CONFIG_MPQEMU) += xbzrle.o postcopy-ram.o
+remote-pci-obj-$(CONFIG_MPQEMU) += qjson.o
+remote-pci-obj-$(CONFIG_MPQEMU) += block-dirty-bitmap.o
+remote-pci-obj-$(CONFIG_RDMA) += rdma.o
+remote-pci-obj-$(CONFIG_MPQEMU) += 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) += tap-win32.o
vde.o-libs = $(VDE_LIBS)
common-obj-$(CONFIG_CAN_BUS) += can/
+
+remote-pci-obj-$(CONFIG_MPQEMU) += 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 += replay-input.o
common-obj-y += replay-char.o
common-obj-y += replay-snapshot.o
common-obj-y += replay-net.o
-common-obj-y += replay-audio.o
\ No newline at end of file
+common-obj-y += 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
MigrationInfo *qmp_query_migrate(Error **errp)
{
@@ -160,3 +189,23 @@ AnnounceParameters *migrate_announce_params(void)
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"
+#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 size)
+{
+ 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"
+#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"
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,
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 @@
#include "vl.h"
+int only_migratable; /* turn it off unless user states otherwise */
+bool enable_mlock;
+
/***********************************************************/
/* QEMU Block devices */
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 = NULL;
ram_addr_t ram_size;
const char *mem_path = NULL;
int mem_prealloc = 0; /* force preallocation of physical target memory */
-bool enable_mlock = false;
bool enable_cpu_pm = 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;
int icount_align_option;
--
1.8.3.1
- [RFC v4 PATCH 28/49] multi-process: add remote options parser, (continued)
- [RFC v4 PATCH 28/49] multi-process: add remote options parser, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 30/49] multi-process: send heartbeat messages to remote, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 31/49] multi-process: handle heartbeat messages in remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 32/49] multi-process: Use separate MMIO communication channel, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 34/49] multi-process/mon: choose HMP commands based on target, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 35/49] multi-process/mon: stub functions to enable QMP module for remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 36/49] multi-process/mon: enable QMP module support in the remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 38/49] multi-process/mon: Initialize QMP module for remote processes, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 37/49] multi-process/mon: Refactor monitor/chardev functions out of vl.c, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 39/49] multi-process: prevent duplicate memory initialization in remote, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 40/49] multi-process/mig: build migration module in the remote process,
Jagannathan Raman <=
- [RFC v4 PATCH 41/49] multi-process/mig: Enable VMSD save in the Proxy object, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 42/49] multi-process/mig: Send VMSD of remote to the Proxy object, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 44/49] multi-process/mig: refactor runstate_check into common file, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 45/49] multi-process/mig: Synchronize runstate of remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 47/49] multi-process: Enable support for multiple devices in remote, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 08/49] multi-process: add functions to synchronize proxy and remote endpoints, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 07/49] multi-process: define mpqemu-link object, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 49/49] multi-process: add configure and usage information, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 48/49] multi-process: add the concept description to docs/devel/qemu-multiprocess, Jagannathan Raman, 2019/10/24