- 04 9月, 2017 1 次提交
-
-
由 Markus Armbruster 提交于
The next commit will put it to use. May look pointless now, but we're going to change the FOO_lookup's type, and then it'll help. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-13-git-send-email-armbru@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 02 8月, 2017 1 次提交
-
-
由 Marc-André Lureau 提交于
Spotted thanks to valgrind and tests/device-introspect-test: ==11711== 1 bytes in 1 blocks are definitely lost in loss record 6 of 14,537 ==11711== at 0x4C2EB6B: malloc (vg_replace_malloc.c:299) ==11711== by 0x1E0CDBD8: g_malloc (gmem.c:94) ==11711== by 0x1E0E696E: g_strdup (gstrfuncs.c:363) ==11711== by 0x695693: migration_instance_init (migration.c:2226) ==11711== by 0x717C4B: object_init_with_type (object.c:344) ==11711== by 0x717E80: object_initialize_with_type (object.c:375) ==11711== by 0x7182EB: object_new_with_type (object.c:483) ==11711== by 0x718328: object_new (object.c:493) ==11711== by 0x4B8A29: qmp_device_list_properties (qmp.c:542) ==11711== by 0x4A9561: qmp_marshal_device_list_properties (qmp-marshal.c:1425) ==11711== by 0x819D4A: do_qmp_dispatch (qmp-dispatch.c:104) ==11711== by 0x819E82: qmp_dispatch (qmp-dispatch.c:131) Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170801160419.14180-1-marcandre.lureau@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
- 24 7月, 2017 4 次提交
-
-
由 Markus Armbruster 提交于
migrate-set-parameters sets migration parameters according to is arguments like this: * Present means "set the parameter to this value" * Absent means "leave the parameter unchanged" * Except for parameters tls_creds and tls_hostname, "" means "reset the parameter to its default value The first two are perfectly normal: presence of the parameter makes the command do something. The third one overloads the parameter with a second meaning. The overloading is *implicit*, i.e. it's not visible in the types. Works here, because "" is neither a valid TLS credentials ID, nor a valid host name. Pressing argument values the schema accepts, but are semantically invalid, into service to mean "reset to default" is not general, as suitable invalid values need not exist. I also find it ugly. To clean this up, we could add a separate flag argument to ask for "reset to default", or add a distinct value to @tls_creds and @tls_hostname. This commit implements the latter: add JSON null to the values of @tls_creds and @tls_hostname, deprecate "". Because we're so close to the 2.10 freeze, implement it in the stupidest way possible: have qmp_migrate_set_parameters() rewrite null to "" before anything else can see the null. The proper way to do it would be rewriting "" to null, but that requires fixing up code to work with null. Add TODO comments for that. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Markus Armbruster 提交于
Commit de63ab61 "migrate: Share common MigrationParameters struct" reused MigrationParameters for the arguments of migrate-set-parameters, with the following rationale: It is rather verbose, and slightly error-prone, to repeat the same set of parameters for input (migrate-set-parameters) as for output (query-migrate-parameters), where the only difference is whether the members are optional. We can just document that the optional members will always be present on output, and then share a common struct between both commands. The next patch can then reduce the amount of code needed on input. I need to unshare them to correct a design flaw in a stupid, but minimally invasive way, in the next commit. We can restore the sharing when we redo that patch in a less stupid way. Add a suitable TODO comment. Note that I revert only the sharing part of commit de63ab61, not the part that made the members of query-migrate-parameters' result optional. The schema (and thus introspection) remains inaccurate for query-migrate-parameters. If we decide not to restore the sharing, we should revert that part, too. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Markus Armbruster 提交于
qmp_query_migrate_parameters() and qmp_migrate_set_parameters() effectively duplicate QAPI_CLONE() inline. Add suitable TODO comments. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Markus Armbruster 提交于
Optional MigrationParameters members tls_creds and tls_hostname can't actually be absent outside qmp_migrate_set_parameters() since commit 4af245dc (v2.9.0). Note that commit 4af245dc reverted the part of commit de63ab61 (v2.8.0) that made tls_creds and tls_hostname absent instead of "" in the value of query-migrate-parameters, even though commit de63ab61 called that a mistake. What a mess. Drop the redundant tests for presence, and update documentation. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
- 18 7月, 2017 10 次提交
-
-
由 Peter Xu 提交于
Checks validity for all the capabilities that we enabled with command line. Signed-off-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1500349150-13240-11-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Abstracted from migrate_set_block_enabled() to allocate MigrationCapabilityStatusList properly. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-10-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Abstract helper function to check migration capabilities (from the old qmp_migrate_set_capabilities). Prepare to be used somewhere else. There is side effect on the change: when applying the capabilities, we were skipping the invalid ones, but still applying the valid ones (if they are provided in the same QMP request). After this refactoring, we'll ignore all the capabilities if we detected invalid setup along the way. However, I don't think it is a problem since general users should not provide anything invalid after all. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-9-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"), colo is always supported. We don't need any colo_supported() now since it is always true. Removing any extra code that depends on it. CC: Paolo Bonzini <pbonzini@redhat.com> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: Zhang Chen<zhangchen.fnst@cn.fujitsu.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-8-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Adding validity check for the migration parameters passed in via global properties. Signed-off-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <1500349150-13240-7-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Abstracted from qmp_migrate_set_parameters(). Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-6-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Helper to check the parameters. Abstracted from qmp_migrate_set_parameters(). Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-5-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Do the same thing to migration capabilities, just like what we did in previous patch for migration parameters. Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-4-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Export migration parameters to qdev properties. Then we can use, for example: -global migration.x-cpu-throttle-initial=xxx To specify migration parameters during init. Prefix "x-" is appended for each parameter exported to show that this is not a stable interface, and only for debugging/testing purpose. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1500349150-13240-3-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Dr. David Alan Gilbert 提交于
Closing the file before exit on a failure allows the source to cleanup better, especially with RDMA. Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <20170717110936.23314-3-dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 11 7月, 2017 5 次提交
-
-
由 Juan Quintela 提交于
Once there, be consistent and use compress_thread_{save,load}_{setup,cleanup}. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170628095228.4661-6-quintela@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
由 Juan Quintela 提交于
Once there, I rename ram_migration_cleanup() to ram_save_cleanup(). Notice that this is the first pass, and I only passed XBZRLE to the new scheme. Moved decoded_buf to inside XBZRLE struct. As a bonus, I don't have to export xbzrle functions from ram.c. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> -- loaded_data pointer was needed because called can change it (dave) spell loaded correctly in comment (dave) Message-Id: <20170628095228.4661-5-quintela@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
由 Juan Quintela 提交于
We are going to use it now for more than save live regions. Once there rename qemu_savevm_state_begin() to qemu_savevm_state_setup(). Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170628095228.4661-2-quintela@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
由 Peter Xu 提交于
[Peter collected Eduardo's patch comment and formatted into patch] Suggested-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1499242883-2184-5-git-send-email-peterx@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
由 Peter Xu 提交于
MigrateState object is not ready at that time, so we'll get an assertion. Use qemu_global_option() instead. Reported-by: NEduardo Habkost <ehabkost@redhat.com> Suggested-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Fixes: 3df663e5 ("migration: move only_migratable to MigrationState") Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1499242883-2184-2-git-send-email-peterx@redhat.com> Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
-
- 28 6月, 2017 9 次提交
-
-
由 Peter Xu 提交于
When this capability is enabled, QEMU will use the return path even for precopy migration. This is helpful at least in one case when destination failed to load the image while source quited without confirmation. With return path, source will wait for the last response from destination, and if destination fails, it'll fail the migration on source, then the guest can be run again on the source (rather than assuming to be good, then the guest will be lost after source quits). It needs to be enabled explicitly on source, otherwise disabled. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498472935-14461-1-git-send-email-peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
It'll be strange that the migration object inherits TYPE_DEVICE. Add some explanations to it. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498634144-26508-1-git-send-email-peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Now we have some globals that can be configured for migration. Dump them in HMP info migration for better debugging. (we can also use this to monitor whether COMPAT fields are applied correctly on compatible machines) Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-11-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
These two parameters: - MachineState::enforce_config_section - MigrationState::send_configuration are playing similar role here. This patch merges the first one into second, then we'll have a single place to reference whether we need to send the configuration section. I didn't remove the MachineState.enforce_config_section field since when applying that machine property (in machine_set_property()) we haven't yet initialized global properties and migration object. Then, it's still not easy to pass that boolean to MigrationState at such an early time. A natural benefit for current patch is that now we kept the meaning of "enforce-config-section" since it'll still have the highest priority (that's what "enforce" mean I guess). Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-10-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Move it into MigrationState, revert its meaning and renaming it to send_section_footer, with a property bound to it. Same trick is played like previous patches. Removing savevm_skip_section_footers(). Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-9-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
It was in SaveState but now moved to MigrationState altogether, reverted its meaning, then renamed to "send_configuration". Again, using HW_COMPAT_2_3 for old PC/SPAPR machines, and accel_register_prop() for xen_init(). Removing savevm_skip_configuration(). Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-8-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
One less global variable, and it does only matter with migration. We keep the old "--only-migratable" option, but also now we support: -global migration.only-migratable=true Currently still keep the old interface. Hmm, now vl.c has no way to access migrate_get_current(). Export a function for it to setup only_migratable. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-7-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Put it into MigrationState then we can use the properties to specify whether to enable storing global state. Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 for x86/power, and AccelClass.global_props for Xen. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-6-git-send-email-peterx@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
由 Peter Xu 提交于
Let the old man "MigrationState" join the object family. Direct benefit is that we can start to use all the property features derived from current QDev, like: HW_COMPAT_* bits, command line setup for migration parameters (so will never need to set them up each time using HMP/QMP, this is really, really attractive for test writters), etc. I see no reason to disallow this happen yet. So let's start from this one, to see whether it would be anything good. Now we init the MigrationState struct statically in main() to make sure it's initialized after global properties are applied, since we'll use them during creation of the object. No functional change at all. Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-5-git-send-email-peterx@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 20 6月, 2017 1 次提交
-
-
由 Fam Zheng 提交于
Previously, dst side will immediately try to lock the write byte upon receiving QEMU_VM_EOF, but at src side, bdrv_inactivate_all() is only done after sending it. If the src host is under load, dst may fail to acquire the lock due to racing with the src unlocking it. Fix this by hoisting the bdrv_inactivate_all() operation before QEMU_VM_EOF. N.B. A further improvement could possibly be done to cleanly handover locks between src and dst, so that there is no window where a third QEMU could steal the locks and prevent src and dst from running. N.B. This commit includes a minor improvement to the error handling by using qemu_file_set_error(). Reported-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NFam Zheng <famz@redhat.com> Message-id: 20170616160658.32290-1-famz@redhat.com Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> [PMM: noted qemu_file_set_error() use in commit as suggested by Daniel] Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 14 6月, 2017 2 次提交
-
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com>
-
由 Peter Xu 提交于
0425dc97 is actually v1 of that patch, but it was accidentally merged (while there was a v2). That will cause problem when we try to migrate to some old QEMUs when return path is not really there. Let's fix it, then squashing this patch with 0425dc97 will be exactly patch content of v2. Fixes: 0425dc97 ("migration: isolate return path on src") Signed-off-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 13 6月, 2017 7 次提交
-
-
由 Juan Quintela 提交于
Nothing uses it outside of migration.h Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
-
由 Juan Quintela 提交于
Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NPeter Xu <peterx@redhat.com>
-
由 Juan Quintela 提交于
It don't belong anywhere else, just the global state where everybody can stick other things. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
-
由 Juan Quintela 提交于
So, move them there. Notice that we export functions that send commands, not the command themselves. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
-
由 Juan Quintela 提交于
Merge them. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
-
由 Juan Quintela 提交于
Once there, create populate_disk_info. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NLaurent Vivier <lvivier@redhat.com> -- - create populate_disk_info instead of "abusing" populate_ram_info
-
由 Eduardo Habkost 提交于
Assigning directly to *errp is not valid, as errp may be NULL, &error_fatal, or &error_abort. Use error_propagate() instead. Cc: Juan Quintela <quintela@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-