Message ID | 1367329288-27178-2-git-send-email-imammedo@redhat.com |
---|---|
State | New |
Headers | show |
On Tue, Apr 30, 2013 at 03:41:24PM +0200, Igor Mammedov wrote: > Hook should be set by target that implements > CPU hot-add via cpu-add QMP command. > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> > --- > include/hw/boards.h | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 425bdc7..75cd127 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -43,6 +43,7 @@ typedef struct QEMUMachine { > GlobalProperty *compat_props; > struct QEMUMachine *next; > const char *hw_version; > + void (*hot_add_cpu)(const int64_t id, Error **errp); > } QEMUMachine; > > int qemu_register_machine(QEMUMachine *m); > -- > 1.7.1 >
Am 30.04.2013 15:41, schrieb Igor Mammedov: > Hook should be set by target that implements > CPU hot-add via cpu-add QMP command. > > Signed-off-by: Igor Mammedov <imammedo@redhat.com> > --- > include/hw/boards.h | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) Thanks, applied to qom-cpu (using a typedef and regrouping it): https://github.com/afaerber/qemu-cpu/commits/qom-cpu This is obviously tied to how the QMP command looks like, but I don't see much room to rearchitect that today - if machines can't support this simplified interface due to complex SoC setups they simply don't implement this hook and cpu-add should fail. Andreas > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 425bdc7..75cd127 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -43,6 +43,7 @@ typedef struct QEMUMachine { > GlobalProperty *compat_props; > struct QEMUMachine *next; > const char *hw_version; > + void (*hot_add_cpu)(const int64_t id, Error **errp); > } QEMUMachine; > > int qemu_register_machine(QEMUMachine *m);
diff --git a/include/hw/boards.h b/include/hw/boards.h index 425bdc7..75cd127 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -43,6 +43,7 @@ typedef struct QEMUMachine { GlobalProperty *compat_props; struct QEMUMachine *next; const char *hw_version; + void (*hot_add_cpu)(const int64_t id, Error **errp); } QEMUMachine; int qemu_register_machine(QEMUMachine *m);
Hook should be set by target that implements CPU hot-add via cpu-add QMP command. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- include/hw/boards.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)