qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 7/7] s390x/cpu: Allow hotplug of CPUs


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v8 7/7] s390x/cpu: Allow hotplug of CPUs
Date: Fri, 4 Mar 2016 08:46:53 +0100

> Implement cpu hotplug routine and add the machine hook.
> 
> Signed-off-by: Matthew Rosato <address@hidden>
> Reviewed-by: David Hildenbrand <address@hidden>
> ---
>  hw/s390x/s390-virtio-ccw.c | 13 +++++++++++++
>  target-s390x/cpu.c         |  7 +++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 7fc1879..174a2f8 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -186,6 +186,18 @@ static HotplugHandler 
> *s390_get_hotplug_handler(MachineState *machine,
>      return NULL;
>  }
> 
> +static void s390_hot_add_cpu(const int64_t id, Error **errp)
> +{
> +    MachineState *machine = MACHINE(qdev_get_machine());
> +    Error *err = NULL;
> +
> +    s390_new_cpu(machine->cpu_model, id, &err);
> +    if (err) {
> +        error_propagate(errp, err);
> +        return;
> +    }

You could unconditionally call error_propagate(errp, err); here

> +}
> +


Still looks good to me!

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]