qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: imammedo@redhat.com, Hu Tao <hu.taoo@gmail.com>,
	qemu-devel@nongnu.org, gaowanlong@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH v19 07/11] qapi: make string output visitor parse int list
Date: Tue, 04 Mar 2014 10:33:18 +0100	[thread overview]
Message-ID: <53159DDE.6010101@redhat.com> (raw)
In-Reply-To: <20140304092336.GA664@G08FNSTD100614.fnst.cn.fujitsu.com>

Il 04/03/2014 10:23, Hu Tao ha scritto:
>> >
>>> > >+            } else {
>>> > >+                out = g_strdup_printf("%lld-%lld",
>>> > >+                                      (long long) sov->range_start.s,
>>> > >+                                      (long long) sov->range_end.s);
>>> > >+            }
>>> > >+        }
>> >
>> > This looks wrong.  You do not insert any separator, and you do not
>> > handle things like "0-3,8-11".  You probably should use a GString
>> > instead of string_output_set.
>
> Right. We should also handle "0-3,8-11"-like lists in string input
> visitor and opts visitor.

Ok, no big deal; let's do one thing at a time.

Regarding string input visitor, I believe we can avoid the code 
duplication by:

(1) using Qmp input/output visitors in query-memdev

(2) using OptsVisitor in -object


The string output visitor becomes more important than the string input 
visitor, but it is only needed for HMP so it is not urgent.

We can then work on making OptsVisitor use the string input visitor 
internally.

But I'm already applying patches 1-5, 8, 9, 10 (the latter with the 
above changes) to the numa tree.

Paolo

  reply	other threads:[~2014-03-04  9:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  7:28 [Qemu-devel] [PATCH v19 00/11] Add support for binding guest numa nodes to host numa nodes Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 01/11] object_add: allow completion handler to get canonical path Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 02/11] add memdev backend infrastructure Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 03/11] pc: pass QEMUMachineInitArgs to pc_memory_init Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 04/11] numa: introduce memory_region_allocate_system_memory Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 05/11] numa: add -numa node, memdev= option Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 06/11] qapi: make string input visitor parse int list Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 07/11] qapi: make string output " Hu Tao
2014-03-04  9:03   ` Paolo Bonzini
2014-03-04  9:23     ` Hu Tao
2014-03-04  9:33       ` Paolo Bonzini [this message]
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 08/11] Add Linux libnuma detection Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 09/11] hostmem backend: implement memory policy Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 10/11] qmp: add query-memdev Hu Tao
2014-03-04  7:28 ` [Qemu-devel] [PATCH v19 11/11] hmp: add info memdev Hu Tao

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=53159DDE.6010101@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=hu.taoo@gmail.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).