Re: [PATCH v2] cphp: remove deprecated cpu-add command(s)

2020-09-14 Thread Cornelia Huck
On Mon, 14 Sep 2020 03:46:14 -0400
Igor Mammedov  wrote:

> theses were deprecated since 4.0, remove both HMP and QMP variants.

s/theses/These/

> 
> Users should use device_add command instead. To get list of
> possible CPUs and options, use 'info hotpluggable-cpus' HMP
> or query-hotpluggable-cpus QMP command.
> 
> Signed-off-by: Igor Mammedov 
> Reviewed-by: Thomas Huth 
> Acked-by: Dr. David Alan Gilbert 
> ---
>  include/hw/boards.h |   1 -
>  include/hw/i386/pc.h|   1 -
>  include/monitor/hmp.h   |   1 -
>  docs/system/deprecated.rst  |  25 +
>  hmp-commands.hx |  15 --
>  hw/core/machine-hmp-cmds.c  |  12 -
>  hw/core/machine-qmp-cmds.c  |  12 -
>  hw/i386/pc.c|  27 --
>  hw/i386/pc_piix.c   |   1 -
>  hw/s390x/s390-virtio-ccw.c  |  12 -
>  qapi/machine.json   |  24 -
>  tests/qtest/cpu-plug-test.c | 100 
>  tests/qtest/test-hmp.c  |   1 -
>  13 files changed, 21 insertions(+), 211 deletions(-)

Acked-by: Cornelia Huck 



Re: [PATCH v2] cphp: remove deprecated cpu-add command(s)

2020-09-14 Thread Igor Mammedov
On Mon, 14 Sep 2020 10:07:36 +0200
Michal Privoznik  wrote:

> On 9/14/20 9:46 AM, Igor Mammedov wrote:
> > theses were deprecated since 4.0, remove both HMP and QMP variants.
> > 
> > Users should use device_add command instead. To get list of
> > possible CPUs and options, use 'info hotpluggable-cpus' HMP
> > or query-hotpluggable-cpus QMP command.
> > 
> > Signed-off-by: Igor Mammedov 
> > Reviewed-by: Thomas Huth 
> > Acked-by: Dr. David Alan Gilbert 
> > ---
> >   include/hw/boards.h |   1 -
> >   include/hw/i386/pc.h|   1 -
> >   include/monitor/hmp.h   |   1 -
> >   docs/system/deprecated.rst  |  25 +
> >   hmp-commands.hx |  15 --
> >   hw/core/machine-hmp-cmds.c  |  12 -
> >   hw/core/machine-qmp-cmds.c  |  12 -
> >   hw/i386/pc.c|  27 --
> >   hw/i386/pc_piix.c   |   1 -
> >   hw/s390x/s390-virtio-ccw.c  |  12 -
> >   qapi/machine.json   |  24 -
> >   tests/qtest/cpu-plug-test.c | 100 
> >   tests/qtest/test-hmp.c  |   1 -
> >   13 files changed, 21 insertions(+), 211 deletions(-)  
> 
> Thanks to Peter Libvirt uses device_add instead cpu_add whenever 
> possible. Hence this is okay from Libvirt's POV.
we shoul make libvirt switch from -numa node,cpus= to -numa cpu=
to get rid of the 'last' interface that uses cpu-index as input.

To help libvirt to migrate existing configs from older syntax to
the newer one, we can introduce field x-cpu-index to
query-hotplugable-cpus output (with a goal to deprecate it in few years).
Would it work for you?

> 
> Reviewed-by: Michal Privoznik 
Thanks!

> 
> Michal
> 



Re: [PATCH v2] cphp: remove deprecated cpu-add command(s)

2020-09-14 Thread Michal Privoznik

On 9/14/20 9:46 AM, Igor Mammedov wrote:

theses were deprecated since 4.0, remove both HMP and QMP variants.

Users should use device_add command instead. To get list of
possible CPUs and options, use 'info hotpluggable-cpus' HMP
or query-hotpluggable-cpus QMP command.

Signed-off-by: Igor Mammedov 
Reviewed-by: Thomas Huth 
Acked-by: Dr. David Alan Gilbert 
---
  include/hw/boards.h |   1 -
  include/hw/i386/pc.h|   1 -
  include/monitor/hmp.h   |   1 -
  docs/system/deprecated.rst  |  25 +
  hmp-commands.hx |  15 --
  hw/core/machine-hmp-cmds.c  |  12 -
  hw/core/machine-qmp-cmds.c  |  12 -
  hw/i386/pc.c|  27 --
  hw/i386/pc_piix.c   |   1 -
  hw/s390x/s390-virtio-ccw.c  |  12 -
  qapi/machine.json   |  24 -
  tests/qtest/cpu-plug-test.c | 100 
  tests/qtest/test-hmp.c  |   1 -
  13 files changed, 21 insertions(+), 211 deletions(-)


Thanks to Peter Libvirt uses device_add instead cpu_add whenever 
possible. Hence this is okay from Libvirt's POV.


Reviewed-by: Michal Privoznik 

Michal



[PATCH v2] cphp: remove deprecated cpu-add command(s)

2020-09-14 Thread Igor Mammedov
theses were deprecated since 4.0, remove both HMP and QMP variants.

Users should use device_add command instead. To get list of
possible CPUs and options, use 'info hotpluggable-cpus' HMP
or query-hotpluggable-cpus QMP command.

Signed-off-by: Igor Mammedov 
Reviewed-by: Thomas Huth 
Acked-by: Dr. David Alan Gilbert 
---
 include/hw/boards.h |   1 -
 include/hw/i386/pc.h|   1 -
 include/monitor/hmp.h   |   1 -
 docs/system/deprecated.rst  |  25 +
 hmp-commands.hx |  15 --
 hw/core/machine-hmp-cmds.c  |  12 -
 hw/core/machine-qmp-cmds.c  |  12 -
 hw/i386/pc.c|  27 --
 hw/i386/pc_piix.c   |   1 -
 hw/s390x/s390-virtio-ccw.c  |  12 -
 qapi/machine.json   |  24 -
 tests/qtest/cpu-plug-test.c | 100 
 tests/qtest/test-hmp.c  |   1 -
 13 files changed, 21 insertions(+), 211 deletions(-)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 795910d01b..7abd5d889c 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -169,7 +169,6 @@ struct MachineClass {
 void (*init)(MachineState *state);
 void (*reset)(MachineState *state);
 void (*wakeup)(MachineState *state);
-void (*hot_add_cpu)(MachineState *state, const int64_t id, Error **errp);
 int (*kvm_type)(MachineState *machine, const char *arg);
 void (*smp_parse)(MachineState *ms, QemuOpts *opts);
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 421a77acc2..79b7ab17bc 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -135,7 +135,6 @@ extern int fd_bootchk;
 
 void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
 
-void pc_hot_add_cpu(MachineState *ms, const int64_t id, Error **errp);
 void pc_smp_parse(MachineState *ms, QemuOpts *opts);
 
 void pc_guest_info_init(PCMachineState *pcms);
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
index c986cfd28b..642e9e91f9 100644
--- a/include/monitor/hmp.h
+++ b/include/monitor/hmp.h
@@ -89,7 +89,6 @@ void hmp_chardev_add(Monitor *mon, const QDict *qdict);
 void hmp_chardev_change(Monitor *mon, const QDict *qdict);
 void hmp_chardev_remove(Monitor *mon, const QDict *qdict);
 void hmp_chardev_send_break(Monitor *mon, const QDict *qdict);
-void hmp_cpu_add(Monitor *mon, const QDict *qdict);
 void hmp_object_add(Monitor *mon, const QDict *qdict);
 void hmp_object_del(Monitor *mon, const QDict *qdict);
 void hmp_info_memdev(Monitor *mon, const QDict *qdict);
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index a158e765c3..c43c53f432 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -284,13 +284,6 @@ The ``query-cpus`` command is replaced by the 
``query-cpus-fast`` command.
 The ``arch`` output member of the ``query-cpus-fast`` command is
 replaced by the ``target`` output member.
 
-``cpu-add`` (since 4.0)
-'''
-
-Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``.  See
-documentation of ``query-hotpluggable-cpus`` for additional
-details.
-
 ``query-events`` (since 4.0)
 
 
@@ -306,12 +299,6 @@ the 'wait' field, which is only applicable to sockets in 
server mode
 Human Monitor Protocol (HMP) commands
 -
 
-``cpu-add`` (since 4.0)
-'''
-
-Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``.  See
-documentation of ``query-hotpluggable-cpus`` for additional details.
-
 ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` 
(since 4.0.0)
 
''
 
@@ -521,6 +508,12 @@ QEMU Machine Protocol (QMP) commands
 The "autoload" parameter has been ignored since 2.12.0. All bitmaps
 are automatically loaded from qcow2 images.
 
+``cpu-add`` (removed in 5.2)
+
+
+Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``.  See
+documentation of ``query-hotpluggable-cpus`` for additional details.
+
 Human Monitor Protocol (HMP) commands
 -
 
@@ -530,6 +523,12 @@ The ``hub_id`` parameter of ``hostfwd_add`` / 
``hostfwd_remove`` (removed in 5.0
 The ``[hub_id name]`` parameter tuple of the 'hostfwd_add' and
 'hostfwd_remove' HMP commands has been replaced by ``netdev_id``.
 
+``cpu-add`` (removed in 5.2)
+
+
+Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``.  See
+documentation of ``query-hotpluggable-cpus`` for additional details.
+
 Guest Emulator ISAs
 ---
 
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 60f395c276..d1e3e0e1c6 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1761,21 +1761,6 @@ SRST
   Executes a qemu-io command on the given block device.
 ERST
 
-{
-.name   = "cpu-add",
-.args_type  = "id:i",
-.params = "id",
-.help   = "add cpu (deprecat