diff mbox

[02/21] cpu: call cpu_synchronize_post_init() from CPUClass.realize() if hotplugged

Message ID 5177CB4D.8040705@suse.de
State New
Headers show

Commit Message

Andreas Färber April 24, 2013, 12:08 p.m. UTC
Am 23.04.2013 17:59, schrieb Andreas Färber:
> Am 23.04.2013 10:29, schrieb Igor Mammedov:
>> ... to synchronize CPU state to KVM
>>
>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>> v2:
>>   * linking kvm-stub.o to *-user target moved in separate patch
> 
> Thanks, applied to qom-cpu:
> https://github.com/afaerber/qemu-cpu/commits/qom-cpu

To facilitate conflict resolution for future patches, I have modified
this to match other functions in there and to spare refactorings:



Andreas

Comments

Igor Mammedov April 24, 2013, 1:34 p.m. UTC | #1
On Wed, 24 Apr 2013 14:08:45 +0200
Andreas Färber <afaerber@suse.de> wrote:

> Am 23.04.2013 17:59, schrieb Andreas Färber:
> > Am 23.04.2013 10:29, schrieb Igor Mammedov:
> >> ... to synchronize CPU state to KVM
> >>
> >> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> >> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> >> ---
> >> v2:
> >>   * linking kvm-stub.o to *-user target moved in separate patch
> > 
> > Thanks, applied to qom-cpu:
> > https://github.com/afaerber/qemu-cpu/commits/qom-cpu
> 
> To facilitate conflict resolution for future patches, I have modified
> this to match other functions in there and to spare refactorings:
> 
> diff --git a/qom/cpu.c b/qom/cpu.c
> index 0c76712..66f7c00 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -58,8 +58,10 @@ static ObjectClass *cpu_common_class_by_name(const
> char *cpu_model)
> 
>  static void cpu_common_realizefn(DeviceState *dev, Error **errp)
>  {
> +    CPUState *cpu = CPU(dev);
> +
>      if (dev->hotplugged) {
> -        cpu_synchronize_post_init(CPU(dev));
> +        cpu_synchronize_post_init(cpu);
>      }
>  }
> 

Fixed conflicts in 4-5/21,
available at https://github.com/imammedo/qemu/commits/cpu_set.WIP

> Andreas
>
diff mbox

Patch

diff --git a/qom/cpu.c b/qom/cpu.c
index 0c76712..66f7c00 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -58,8 +58,10 @@  static ObjectClass *cpu_common_class_by_name(const
char *cpu_model)

 static void cpu_common_realizefn(DeviceState *dev, Error **errp)
 {
+    CPUState *cpu = CPU(dev);
+
     if (dev->hotplugged) {
-        cpu_synchronize_post_init(CPU(dev));
+        cpu_synchronize_post_init(cpu);
     }
 }