> Implement cpu hotplug routine and add the machine hook. > > Signed-off-by: Matthew Rosato <mjros...@linux.vnet.ibm.com> > Reviewed-by: David Hildenbrand <d...@linux.vnet.ibm.com> > --- > 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