[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/43] migration: Move qmp_query_migrate_capabilities() to option
From: |
Juan Quintela |
Subject: |
[PATCH 15/43] migration: Move qmp_query_migrate_capabilities() to options.c |
Date: |
Thu, 2 Mar 2023 17:33:42 +0100 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.c | 22 ----------------------
migration/options.c | 23 +++++++++++++++++++++++
2 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index dd8df53684..5c70bb3153 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -886,28 +886,6 @@ void migrate_send_rp_resume_ack(MigrationIncomingState
*mis, uint32_t value)
migrate_send_rp_message(mis, MIG_RP_MSG_RESUME_ACK, sizeof(buf), &buf);
}
-MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
-{
- MigrationCapabilityStatusList *head = NULL, **tail = &head;
- MigrationCapabilityStatus *caps;
- MigrationState *s = migrate_get_current();
- int i;
-
- for (i = 0; i < MIGRATION_CAPABILITY__MAX; i++) {
-#ifndef CONFIG_LIVE_BLOCK_MIGRATION
- if (i == MIGRATION_CAPABILITY_BLOCK) {
- continue;
- }
-#endif
- caps = g_malloc0(sizeof(*caps));
- caps->capability = i;
- caps->state = s->capabilities[i];
- QAPI_LIST_APPEND(tail, caps);
- }
-
- return head;
-}
-
MigrationParameters *qmp_query_migrate_parameters(Error **errp)
{
MigrationParameters *params;
diff --git a/migration/options.c b/migration/options.c
index 2cae0b8f08..ac9098fbfb 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -15,6 +15,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qapi/qapi-commands-migration.h"
#include "sysemu/runstate.h"
#include "migration.h"
#include "ram.h"
@@ -392,3 +393,25 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps,
Error **errp)
return true;
}
+
+MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
+{
+ MigrationCapabilityStatusList *head = NULL, **tail = &head;
+ MigrationCapabilityStatus *caps;
+ MigrationState *s = migrate_get_current();
+ int i;
+
+ for (i = 0; i < MIGRATION_CAPABILITY__MAX; i++) {
+#ifndef CONFIG_LIVE_BLOCK_MIGRATION
+ if (i == MIGRATION_CAPABILITY_BLOCK) {
+ continue;
+ }
+#endif
+ caps = g_malloc0(sizeof(*caps));
+ caps->capability = i;
+ caps->state = s->capabilities[i];
+ QAPI_LIST_APPEND(tail, caps);
+ }
+
+ return head;
+}
--
2.39.2
- [PATCH 05/43] migration: Move migrate_colo_enabled() to options.c, (continued)
- [PATCH 05/43] migration: Move migrate_colo_enabled() to options.c, Juan Quintela, 2023/03/02
- [PATCH 09/43] migration: Move migrate_use_zero_copy_send() to options.c, Juan Quintela, 2023/03/02
- [PATCH 06/43] migration: Move migrate_use_compression() to options.c, Juan Quintela, 2023/03/02
- [PATCH 07/43] migration: Move migrate_use_events() to options.c, Juan Quintela, 2023/03/02
- [PATCH 10/43] migration: Move migrate_use_xbzrle() to options.c, Juan Quintela, 2023/03/02
- [PATCH 08/43] migration: Move migrate_use_multifd() to options.c, Juan Quintela, 2023/03/02
- [PATCH 11/43] migration: Move migrate_use_block() to options.c, Juan Quintela, 2023/03/02
- [PATCH 12/43] migration: Move migrate_use_return() to options.c, Juan Quintela, 2023/03/02
- [PATCH 13/43] migration: Create migrate_rdma_pin_all() function, Juan Quintela, 2023/03/02
- [PATCH 14/43] migration: Move migrate_caps_check() to options.c, Juan Quintela, 2023/03/02
- [PATCH 15/43] migration: Move qmp_query_migrate_capabilities() to options.c,
Juan Quintela <=
- [PATCH 16/43] migration: Move qmp_migrate_set_capabilities() to options.c, Juan Quintela, 2023/03/02
- [PATCH 17/43] migration: Move migrate_cap_set() to options.c, Juan Quintela, 2023/03/02
- [PATCH 18/43] migration: Move parameters functions to option.c, Juan Quintela, 2023/03/02
- [PATCH 19/43] migration: Use migrate_max_postcopy_bandwidth(), Juan Quintela, 2023/03/02
- [PATCH 21/43] migration: Create migrate_throttle_trigger_threshold(), Juan Quintela, 2023/03/02
- [PATCH 23/43] migration: Create migrate_max_cpu_throttle(), Juan Quintela, 2023/03/02
- [PATCH 20/43] migration: Move migrate_use_block_incremental() to option.c, Juan Quintela, 2023/03/02
- [PATCH 24/43] migration: Move migrate_announce_params() to option.c, Juan Quintela, 2023/03/02
- [PATCH 25/43] migration: Create migrate_cpu_throttle_initial() to option.c, Juan Quintela, 2023/03/02
- [PATCH 22/43] migration: Create migrate_checkpoint_delay(), Juan Quintela, 2023/03/02