[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from ps
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards |
Date: |
Wed, 6 Jul 2016 13:45:54 +0200 |
On Wed, 6 Jul 2016 14:29:21 +0530
Bharata B Rao <address@hidden> wrote:
> Turn on use-migration-id property. Starting from pseries-2.7, prefer
> the use of migration_id (cpu_dt_id) over cpu_index for cpu vmstate
> registration and in XICS code.
>
> This allows migration to work when CPU cores are not necessarily
> unplugged in LIFO order.
>
> TODO: Property use-migration-id is by default turned on, check
> if this needs to turned off for older machine type versions of
> all archs.
>
> Signed-off-by: Bharata B Rao <address@hidden>
> ---
> hw/ppc/spapr.c | 5 +++++
> qom/cpu.c | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 7f33a1b..be9af10 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2501,6 +2501,11 @@ DEFINE_SPAPR_MACHINE(2_7, "2.7", true);
> .driver = TYPE_SPAPR_PCI_HOST_BRIDGE,\
> .property = "ddw",\
> .value = stringify(off),\
> + }, \
> + { \
> + .driver = TYPE_CPU,\
> + .property = "use-migration-id",\
> + .value = stringify(off),\
nit,
why not to use "off" directly, stringify looks odd here.
> },
>
> static void spapr_machine_2_6_instance_options(MachineState *machine)
> diff --git a/qom/cpu.c b/qom/cpu.c
> index 01cf136..e505810 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -351,6 +351,7 @@ static void cpu_common_initfn(Object *obj)
> object_property_add_bool(obj, "use-migration-id",
> cpu_common_get_use_migration_id,
> cpu_common_set_use_migration_id, NULL);
> + object_property_set_bool(obj, true, "use-migration-id", NULL);
> }
>
> static void cpu_common_finalize(Object *obj)
- Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs, (continued)