From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQS5g-0003v5-NL for qemu-devel@nongnu.org; Tue, 24 Feb 2015 21:52:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQS5d-00040a-Il for qemu-devel@nongnu.org; Tue, 24 Feb 2015 21:52:48 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:53263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQS5c-0003zj-Pb for qemu-devel@nongnu.org; Tue, 24 Feb 2015 21:52:45 -0500 Message-ID: <54ED38CF.2010905@huawei.com> Date: Wed, 25 Feb 2015 10:51:59 +0800 From: zhanghailiang MIME-Version: 1.0 References: <1424142892-7275-1-git-send-email-mdroth@linux.vnet.ibm.com> <1424142892-7275-6-git-send-email-mdroth@linux.vnet.ibm.com> <54E35D94.2020209@redhat.com> In-Reply-To: <54E35D94.2020209@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/10] qga: introduce three guest memory block commmands with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Michael Roth , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, peter.huangpeng@huawei.com On 2015/2/17 23:26, Eric Blake wrote: > On 02/16/2015 08:14 PM, Michael Roth wrote: >> From: zhanghailiang >> >> Introduce three new guest commands: >> guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size. > > Sorry for the late review, but I think guest-get-memory-block-size is > the wrong command to add. > > >> +## >> +# @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' } > > Any QAPI command that returns a bare int instead of a dictionary is > non-extensible, and therefore of suspect design. I think it would be > better to have: > > { 'command': 'guest-get-memory-block-info', > 'returns': { 'size': 'int' } } > > to allow for future extension. > Good idea, and Michael Roth has changed it like that, thanks for you comments.