From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLp8f-0005ch-Ac for qemu-devel@nongnu.org; Thu, 12 Feb 2015 03:28:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLp8c-0004R1-3h for qemu-devel@nongnu.org; Thu, 12 Feb 2015 03:28:45 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:25057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLp8b-0004Oj-EB for qemu-devel@nongnu.org; Thu, 12 Feb 2015 03:28:42 -0500 Message-ID: <54DC640B.6010503@huawei.com> Date: Thu, 12 Feb 2015 16:27:55 +0800 From: zhanghailiang MIME-Version: 1.0 References: <1421894406-12180-1-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1421894406-12180-1-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/5] qga: add three logical memory hotplug related commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Cc: hangaohuai@huawei.com, lersek@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com ping... Any comments/feedbacks are warmly welcomed. Michael? What's your opinion? ;) Thanks. On 2015/1/22 10:40, zhanghailiang wrote: > This patch series add three guest commands about memory block: > guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size. > > With these three commands, we can get information about guest's memory block > online/offline status and memory block size (unit of memory online/offline > operation ). Also, we can change guest's memory block status (Logical memory > hotplug/unplug) from host. > > Example of usage: > > {"execute":"guest-get-memory-blocks"} > {"return":[{"online":true,"can-offline":false,"phys-index":0},{"online":true,"can-offline":true,"phys-index":1},{"online":true,"can-offline":false,"phys-index":2},{"online":true,"can-offline":false,"phys-index":3}]} > > {"execute":"guest-set-memory-blocks","arguments":{"mem-blks":[{"phys-index":0,"online":false},{"phys-index":1,"online":false},{"phys-index":3,"online":false}]}} > {"return":[{"response":"operation-failed","error-code":22,"phys-index":0},{"response":"success","phys-index":1},{"response":"operation-failed","error-code":16,"phys-index":3}]} > > {"execute":"guest-get-memory-block-size"} > {"return":134217728} > > v2: > - Change return value of 'guest-set-memory-blocks' command from 'int' to a list > of 'GuestMemoryBlockResponse', which contains more info about the operation > results. It is suggested by Michael Roth. It is more useful for callers to > know the exact operation result for each memory block, and also they can help > callers to decide what to do next according to different error-code. > > zhanghailiang (5): > qga: introduce three guest memory block commmands with stubs > qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs > qga: implement qmp_guest_set_memory_blocks() for Linux with sysfs > qga: implement qmp_guest_get_memory_block_size() for Linux with sysfs > qga: add memory block command that unsupported to blacklist > > qga/commands-posix.c | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++- > qga/commands-win32.c | 21 ++++ > qga/qapi-schema.json | 114 ++++++++++++++++++ > 3 files changed, 458 insertions(+), 1 deletion(-) >