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

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

Users should use device_add commnad 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 
---
 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 bc5b82ad20..2163843bdb 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -173,7 +173,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 fe52e165b2..ca8ff6cd27 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -137,7 +137,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 851dbdeb8a..122717cfee 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)
 
''
 
@@ -514,6 +501,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
 -
 
@@ -523,6 +516,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 (deprecated, use device_add instead)",
-.cmd= hmp

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

2020-09-11 Thread Thomas Huth
What does cphp in the subject mean?

On 11/09/2020 14.33, Igor Mammedov wrote:
> theses were deprecatedince since 4.0, remove both HMP and QMP variants.

deprecated since

> Users should use device_add commnad instead. To get list of

command

> possible CPUs and options, use 'info hotpluggable-cpus' HMP
> or query-hotpluggable-cpus QMP command.
> 
> Signed-off-by: Igor Mammedov 
> ---
>  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(-)

With the typos fixed:
Reviewed-by: Thomas Huth 




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

2020-09-11 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote:
> theses were deprecatedince since 4.0, remove both HMP and QMP variants.
> 
> Users should use device_add commnad 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 
> ---
>  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 bc5b82ad20..2163843bdb 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -173,7 +173,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 fe52e165b2..ca8ff6cd27 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -137,7 +137,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 851dbdeb8a..122717cfee 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)
>  
> ''
>  
> @@ -514,6 +501,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
>  -
>  
> @@ -523,6 +516,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