From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtoz-0004DK-NT for qemu-devel@nongnu.org; Tue, 04 Mar 2014 13:12:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKtou-0000A8-Mj for qemu-devel@nongnu.org; Tue, 04 Mar 2014 13:12:05 -0500 Received: from mail-qa0-x229.google.com ([2607:f8b0:400d:c00::229]:52010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKtou-0000A0-Hz for qemu-devel@nongnu.org; Tue, 04 Mar 2014 13:12:00 -0500 Received: by mail-qa0-f41.google.com with SMTP id j5so5266479qaq.28 for ; Tue, 04 Mar 2014 10:12:00 -0800 (PST) Sender: Paolo Bonzini Message-ID: <53161769.8030500@redhat.com> Date: Tue, 04 Mar 2014 19:11:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1393941656-29068-1-git-send-email-pbonzini@redhat.com> <1393941656-29068-29-git-send-email-pbonzini@redhat.com> <53160F50.4040001@redhat.com> In-Reply-To: <53160F50.4040001@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2.1 28/28] qmp: add query-memdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: ehabkost@redhat.com, hutao@cn.fujitsu.com, mtosatti@redhat.com, imammedo@redhat.com, a.motakis@virtualopensystems.com, gaowanlong@cn.fujitsu.com Il 04/03/2014 18:37, Eric Blake ha scritto: > On 03/04/2014 07:00 AM, Paolo Bonzini wrote: >> From: Hu Tao >> >> Add qmp command query-memdev to query for information >> of memory devices >> >> Signed-off-by: Hu Tao >> [Use QMP visitors instead of String visitors. - Paolo] >> Signed-off-by: Paolo Bonzini >> --- >> numa.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> qapi-schema.json | 31 +++++++++++++++++++++++++++ >> qmp-commands.hx | 32 ++++++++++++++++++++++++++++ >> 3 files changed, 127 insertions(+) >> > >> +++ b/qapi-schema.json >> @@ -4576,3 +4576,34 @@ >> ## >> { 'enum': 'HostMemPolicy', >> 'data': [ 'default', 'preferred', 'membind', 'interleave' ] } >> + >> +## >> +# @Memdev: >> +# >> +# Information of memory device >> +# >> +# @size: memory device size >> +# >> +# @host-nodes: host nodes for its memory policy >> +# >> +# @policy: memory policy of memory device >> +# >> +# Since: 2.1 >> +## >> + >> +{ 'type': 'Memdev', >> + 'data': { >> + 'size': 'size', >> + 'host-nodes': ['uint16'], >> + 'policy': 'str' }} > > Why is policy 'str', when you just defined 'HostMemPolicy' as an enum in > the previous patch? Should this be using the enum? Good catch. > >> +<- { "return": [ >> + { >> + "size": 536870912, >> + "host-nodes": [0, 1], >> + "policy": "bind" > > "bind" is not one of the values of HostMemPolicy - is that missing from > patch 27/28? Should be membind. Paolo