[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/16] migration: check global caps for validity
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 16/16] migration: check global caps for validity |
Date: |
Tue, 18 Jul 2017 17:41:27 +0200 |
From: Peter Xu <address@hidden>
Checks validity for all the capabilities that we enabled with command
line.
Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/migration.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 0ebdde1..7615391 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2166,11 +2166,27 @@ static void migration_instance_init(Object *obj)
*/
static bool migration_object_check(MigrationState *ms, Error **errp)
{
+ MigrationCapabilityStatusList *head = NULL;
+ /* Assuming all off */
+ bool cap_list[MIGRATION_CAPABILITY__MAX] = { 0 }, ret;
+ int i;
+
if (!migrate_params_check(&ms->parameters, errp)) {
return false;
}
- return true;
+ for (i = 0; i < MIGRATION_CAPABILITY__MAX; i++) {
+ if (ms->enabled_capabilities[i]) {
+ head = migrate_cap_add(head, i, true);
+ }
+ }
+
+ ret = migrate_caps_check(cap_list, head, errp);
+
+ /* It works with head == NULL */
+ qapi_free_MigrationCapabilityStatusList(head);
+
+ return ret;
}
static const TypeInfo migration_type = {
--
2.9.4
- [Qemu-devel] [PULL 06/16] migration/rdma: Send error during cancelling, (continued)
- [Qemu-devel] [PULL 06/16] migration/rdma: Send error during cancelling, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 07/16] qdev: provide DEFINE_PROP_INT64(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 09/16] migration: export capabilities to props, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 08/16] migration: export parameters to props, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 10/16] migration: introduce migrate_params_check(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 11/16] migration: provide migrate_params_apply(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 13/16] migration: remove check against colo support, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 12/16] migration: check global params for validity, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 14/16] migration: provide migrate_caps_check(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 15/16] migration: provide migrate_cap_add(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 16/16] migration: check global caps for validity,
Juan Quintela <=
- Re: [Qemu-devel] [PULL 00/16] Migration, no-reply, 2017/07/18
- Re: [Qemu-devel] [PULL 00/16] Migration, Peter Maydell, 2017/07/19