diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6e852e8887..227a66cce4 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12743,7 +12743,8 @@ qemuDomainMigratePerform3Params(virDomainPtr dom, if (nmigrate_disks < 0) goto cleanup; - if (!(migParams = qemuMigrationParamsFromFlags(params, nparams, flags))) + if (!(migParams = qemuMigrationParamsFromFlags(params, nparams, flags, + QEMU_MIGRATION_SOURCE))) goto cleanup; if (!(compression = qemuMigrationAnyCompressionParse(params, nparams, flags))) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index a7b5ce385e..b55abc2e36 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -80,7 +80,8 @@ qemuMigrationParamsFree(qemuMigrationParamsPtr migParams) qemuMigrationParamsPtr qemuMigrationParamsFromFlags(virTypedParameterPtr params, int nparams, - unsigned long flags) + unsigned long flags, + qemuMigrationParty party) { qemuMigrationParamsPtr migParams; @@ -102,8 +103,10 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr params, migParams->params.VAR ## _set = true; \ } while (0) - GET(AUTO_CONVERGE_INITIAL, cpuThrottleInitial); - GET(AUTO_CONVERGE_INCREMENT, cpuThrottleIncrement); + if (party == QEMU_MIGRATION_SOURCE) { + GET(AUTO_CONVERGE_INITIAL, cpuThrottleInitial); + GET(AUTO_CONVERGE_INCREMENT, cpuThrottleIncrement); + } #undef GET diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h index 7ca667a507..d66fdb7cde 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -50,6 +50,11 @@ struct _qemuMigrationCompression { typedef struct _qemuMigrationParams qemuMigrationParams; typedef qemuMigrationParams *qemuMigrationParamsPtr; +typedef enum { + QEMU_MIGRATION_SOURCE = (1 << 0), + QEMU_MIGRATION_DESTINATION = (1 << 1), +} qemuMigrationParty; + qemuMigrationParamsPtr qemuMigrationParamsNew(void); @@ -57,7 +62,8 @@ qemuMigrationParamsNew(void); qemuMigrationParamsPtr qemuMigrationParamsFromFlags(virTypedParameterPtr params, int nparams, - unsigned long flags); + unsigned long flags, + qemuMigrationParty party); void qemuMigrationParamsFree(qemuMigrationParamsPtr migParams);