From: Eric Blake <eblake@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: mjrosato@linux.vnet.ibm.com, thuth@redhat.com,
pkrempa@redhat.com, ehabkost@redhat.com, aik@ozlabs.ru,
armbru@redhat.com, agraf@suse.de, borntraeger@de.ibm.com,
qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com,
pbonzini@redhat.com, dgibson@redhat.com,
mdroth@linux.vnet.ibm.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v5 1/2] QMP: add query-hotpluggable-cpus
Date: Mon, 28 Mar 2016 09:28:30 -0600 [thread overview]
Message-ID: <56F94D9E.7070002@redhat.com> (raw)
In-Reply-To: <1459018613-78377-1-git-send-email-imammedo@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3403 bytes --]
On 03/26/2016 12:56 PM, Igor Mammedov wrote:
> it will allow mgmt to query present and hotpluggable
> CPU objects, it is required from a target platform that
> wish to support command to implement and set
> MachineClass.query_hotpluggable_cpus
> callback, which will return a list of possible CPU objects
> with options that would be needed for hotplugging possible
> CPU objects.
>
> There are:
> 'type': 'str' - QOM CPU object type for usage with device_add
> 'vcpus-count': 'int' - number of logical VCPU threads per
> CPU object (mgmt needs to know)
>
> and a set of optional fields that are to used for hotplugging
> a CPU objects and would allows mgmt tools to know what/where
> it could be hotplugged;
> [node],[socket],[core],[thread]
>
> For present CPUs there is a 'qom-path' field which
> would allow mgmt to inspect whatever object/abstraction
> the target platform considers as CPU object.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> +++ b/qapi-schema.json
> @@ -4126,3 +4126,44 @@
> ##
> { 'enum': 'ReplayMode',
> 'data': [ 'none', 'record', 'play' ] }
> +
> +##
> +# CpuInstanceProperties
> +#
> +# @node: NUMA node ID the CPU belongs to, optional
Mark this with '#optional', like you do in the other members.
> +# @socket: #optional socket number within node/board the CPU belongs to
> +# @core: #optional core number within socket the CPU belongs to
> +# @thread: #optional thread number within core the CPU belongs to
> +#
> +# Since: 2.7
> +{ 'struct': 'CpuInstanceProperties',
Missing ## trailing doc marker. Doesn't matter quite yet, but will once
Marc-Andre's patches for automated doc generation land.
> + 'data': { '*node': 'int',
> + '*socket': 'int',
> + '*core': 'int',
> + '*thread': 'int'
> + }
> +}
> +
> +##
> +# @HotpluggableCPU
> +#
> +# @type: CPU object type for usage with device_add command
> +# @props: list of properties to be used for hotplugging CPU
> +# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
> +# @qom-path: #optional link to existing CPU object if CPU is present or
> +# omitted if CPU is not present.
> +#
> +# Since: 2.7
> +{ 'struct': 'HotpluggableCPU',
Another missing ##
> + 'data': { 'type': 'str',
> + 'vcpus-count': 'int',
> + 'props': 'CpuInstanceProperties',
> + '*qom-path': 'str'
> + }
> +}
> +
> +##
> +# @query-hotpluggable-cpus
> +#
> +# Since: 2.7
> +{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
Looks okay.
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 9e05365..85ffba3 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -4853,3 +4853,46 @@ Example:
> {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
> "pop-vlan": 1, "id": 251658240}
> ]}
> +
> +EQMP
> +
> + {
> + .name = "query-hotpluggable-cpus",
> + .args_type = "",
> + .mhandler.cmd_new = qmp_marshal_query_hotpluggable_cpus,
> + },
> +
> +SQMP
> +Show existing/possible CPUs
Why two spaces?
> +-------------------------------
Line is too long.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-03-28 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 15:07 [Qemu-devel] [PATCH v4 0/2] spapr: QMP: add query-hotpluggable-cpus Igor Mammedov
2016-03-24 15:07 ` [Qemu-devel] [PATCH v4 1/2] " Igor Mammedov
2016-03-26 18:56 ` [Qemu-devel] [PATCH v5 " Igor Mammedov
2016-03-28 15:28 ` Eric Blake [this message]
2016-03-24 15:07 ` [Qemu-devel] [RFC v4 2/2] spapr: implement query-hotpluggable-cpus callback Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56F94D9E.7070002@redhat.com \
--to=eblake@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=dgibson@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mjrosato@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).