From: Eric Blake <eblake@redhat.com>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>, qemu-devel@nongnu.org
Cc: hangaohuai@huawei.com, lcapitulino@redhat.com, lersek@redhat.com,
peter.huangpeng@huawei.com, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2 1/5] qga: introduce three guest memory block commmands with stubs
Date: Tue, 17 Feb 2015 08:24:04 -0700 [thread overview]
Message-ID: <54E35D14.1030409@redhat.com> (raw)
In-Reply-To: <1421894406-12180-2-git-send-email-zhang.zhanghailiang@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On 01/21/2015 07:40 PM, zhanghailiang wrote:
> Introduce three new guest commands:
> guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size.
>
> With these three commands, we can support online/offline guest's memory block
> (logical memory hotplug/unplug) as required from host.
>
> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
> ---
> qga/commands-posix.c | 38 +++++++++++++++++
> qga/commands-win32.c | 19 +++++++++
> qga/qapi-schema.json | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 171 insertions(+)
>
> +
> +##
> +# @guest-get-memory-block-size:
> +#
> +# Get the the size (in bytes) of a memory block in guest.
> +# It is the unit of memory block online/offline operation (also called Logical
> +# Memory Hotplug).
> +#
> +# Returns: memory block size in bytes.
> +#
> +# Since 2.3
> +##
> +{ 'command': 'guest-get-memory-block-size',
> + 'returns': 'int' }
Yuck. This is not extensible. Please consider instead providing a
dictionary-based response, so that you can add further dictionary
members in the future if you have additional pieces of information to
return. In fact, if you do that, it might be better to name this
guest-get-memory-block-info, where size is the only info you provide
now, but where adding other parameters in the future is much easier to
predict.
--
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:[~2015-02-17 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 2:40 [Qemu-devel] [PATCH v2 0/5] qga: add three logical memory hotplug related commands zhanghailiang
2015-01-22 2:40 ` [Qemu-devel] [PATCH v2 1/5] qga: introduce three guest memory block commmands with stubs zhanghailiang
2015-02-17 15:24 ` Eric Blake [this message]
2015-01-22 2:40 ` [Qemu-devel] [PATCH v2 2/5] qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs zhanghailiang
2015-01-22 2:40 ` [Qemu-devel] [PATCH v2 3/5] qga: implement qmp_guest_set_memory_blocks() " zhanghailiang
2015-01-22 2:40 ` [Qemu-devel] [PATCH v2 4/5] qga: implement qmp_guest_get_memory_block_size() " zhanghailiang
2015-01-22 2:40 ` [Qemu-devel] [PATCH v2 5/5] qga: add memory block command that unsupported to blacklist zhanghailiang
2015-02-12 8:27 ` [Qemu-devel] [PATCH v2 0/5] qga: add three logical memory hotplug related commands zhanghailiang
2015-02-17 2:05 ` Michael Roth
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=54E35D14.1030409@redhat.com \
--to=eblake@redhat.com \
--cc=hangaohuai@huawei.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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).