diff mbox series

[2/5] qapi/machine: Clean up documentation around CpuInstanceProperties

Message ID 20240711112228.2140606-3-armbru@redhat.com
State New
Headers show
Series qapi: Doc comment cleanups | expand

Commit Message

Markus Armbruster July 11, 2024, 11:22 a.m. UTC
CpuInstanceProperties' doc comment describes its members as properties
to be passed to device_add when hot-plugging a CPU.

This was in fact the initial use of this type, with
query-hotpluggable-cpus: letting management applications find out what
properties need to be passed with device_add to hot-plug a CPU.

We've since added other uses: set-numa-node (commit 419fcdec3c1 and
f3be67812c2), and query-cpus-fast (commit ce74ee3dea6).  These are not
about device-add.

query-hotpluggable-cpus uses CpuInstanceProperties within
HotpluggableCPU.  Lift the documentation related to device-add from
CpuInstanceProperties to HotpluggableCPU.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/machine.json | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Comments

John Snow July 16, 2024, 4:08 p.m. UTC | #1
On Thu, Jul 11, 2024, 7:22 AM Markus Armbruster <armbru@redhat.com> wrote:

> CpuInstanceProperties' doc comment describes its members as properties
> to be passed to device_add when hot-plugging a CPU.
>
> This was in fact the initial use of this type, with
> query-hotpluggable-cpus: letting management applications find out what
> properties need to be passed with device_add to hot-plug a CPU.
>
> We've since added other uses: set-numa-node (commit 419fcdec3c1 and
> f3be67812c2), and query-cpus-fast (commit ce74ee3dea6).  These are not
> about device-add.
>
> query-hotpluggable-cpus uses CpuInstanceProperties within
> HotpluggableCPU.  Lift the documentation related to device-add from
> CpuInstanceProperties to HotpluggableCPU.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>

Reviewed-by: John Snow <jsnow@redhat.com>

---
>  qapi/machine.json | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index f15ad1b43e..50ff102d56 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -960,9 +960,7 @@
>  ##
>  # @CpuInstanceProperties:
>  #
> -# List of properties to be used for hotplugging a CPU instance, it
> -# should be passed by management with device_add command when a CPU is
> -# being hotplugged.
> +# Properties identifying a CPU.
>  #
>  # Which members are optional and which mandatory depends on the
>  # architecture and board.
> @@ -996,9 +994,6 @@
>  #
>  # @thread-id: thread number within the core the CPU  belongs to
>  #
> -# .. note:: Management should be prepared to pass through additional
> -#    properties with device_add.
> -#
>  # Since: 2.7
>  ##
>  { 'struct': 'CpuInstanceProperties',
> @@ -1020,7 +1015,8 @@
>  #
>  # @type: CPU object type for usage with device_add command
>  #
> -# @props: list of properties to be used for hotplugging CPU
> +# @props: list of properties to pass for hotplugging a CPU with
> +#     device_add
>  #
>  # @vcpus-count: number of logical VCPU threads @HotpluggableCPU
>  #     provides
> @@ -1028,6 +1024,9 @@
>  # @qom-path: link to existing CPU object if CPU is present or omitted
>  #     if CPU is not present.
>  #
> +# .. note:: Management should be prepared to pass through additional
> +#    properties with device_add.
> +#
>  # Since: 2.7
>  ##
>  { 'struct': 'HotpluggableCPU',
> --
> 2.45.0
>
>
diff mbox series

Patch

diff --git a/qapi/machine.json b/qapi/machine.json
index f15ad1b43e..50ff102d56 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -960,9 +960,7 @@ 
 ##
 # @CpuInstanceProperties:
 #
-# List of properties to be used for hotplugging a CPU instance, it
-# should be passed by management with device_add command when a CPU is
-# being hotplugged.
+# Properties identifying a CPU.
 #
 # Which members are optional and which mandatory depends on the
 # architecture and board.
@@ -996,9 +994,6 @@ 
 #
 # @thread-id: thread number within the core the CPU  belongs to
 #
-# .. note:: Management should be prepared to pass through additional
-#    properties with device_add.
-#
 # Since: 2.7
 ##
 { 'struct': 'CpuInstanceProperties',
@@ -1020,7 +1015,8 @@ 
 #
 # @type: CPU object type for usage with device_add command
 #
-# @props: list of properties to be used for hotplugging CPU
+# @props: list of properties to pass for hotplugging a CPU with
+#     device_add
 #
 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU
 #     provides
@@ -1028,6 +1024,9 @@ 
 # @qom-path: link to existing CPU object if CPU is present or omitted
 #     if CPU is not present.
 #
+# .. note:: Management should be prepared to pass through additional
+#    properties with device_add.
+#
 # Since: 2.7
 ##
 { 'struct': 'HotpluggableCPU',