Re: [PATCH 13/15] qemu: Send updated CPU in migration cookie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 05, 2017 at 11:27:01AM +0200, Jiri Denemark wrote:
> Since the domain XML send during migration uses the original guest CPU
> definition but we still want the destination to enforce ABI if it is new
> enough, we send the live updated CPU definition in a migration cookie.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_migration.c        | 11 ++++++++---
>  src/qemu/qemu_migration_cookie.c | 31 ++++++++++++++++++++++++++++++-
>  src/qemu/qemu_migration_cookie.h |  5 +++++
>  3 files changed, 43 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 2cd862875..134c76c5e 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -2020,6 +2020,9 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
>           vm->newDef && !qemuDomainVcpuHotplugIsInOrder(vm->newDef)))
>          cookieFlags |= QEMU_MIGRATION_COOKIE_CPU_HOTPLUG;
>  
> +    if (priv->origCPU)
> +        cookieFlags |= QEMU_MIGRATION_COOKIE_CPU;
> +
>      if (!(mig = qemuMigrationEatCookie(driver, vm, NULL, 0, 0)))
>          goto cleanup;
>  
> @@ -2644,7 +2647,8 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
>                                         QEMU_MIGRATION_COOKIE_LOCKSTATE |
>                                         QEMU_MIGRATION_COOKIE_NBD |
>                                         QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG |
> -                                       QEMU_MIGRATION_COOKIE_CPU_HOTPLUG)))
> +                                       QEMU_MIGRATION_COOKIE_CPU_HOTPLUG |
> +                                       QEMU_MIGRATION_COOKIE_CPU)))
>          goto cleanup;
>  
>      if (STREQ_NULLABLE(protocol, "rdma") &&
> @@ -3644,8 +3648,9 @@ qemuMigrationRun(virQEMUDriverPtr driver,
>              if (!(persistDef = qemuMigrationPrepareDef(driver, persist_xml,
>                                                         NULL, NULL)))
>                  goto cleanup;
> -        } else if (vm->newDef) {
> -            if (!(persistDef = qemuDomainDefCopy(driver, vm->newDef,
> +        } else {
> +            virDomainDefPtr def = vm->newDef ? vm->newDef : vm->def;
> +            if (!(persistDef = qemuDomainDefCopy(driver, def,
>                                                   VIR_DOMAIN_XML_SECURE |
>                                                   VIR_DOMAIN_XML_MIGRATABLE)))

This hunk should be in a separate patch because it doesn't have anything
in common with the rest of the patch.

Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux