Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Eric Blake
ma': 'str'} } >> + >> +## >> +# @query-config-schema >> +# >> +# Query configuration schema information of options > > And this. But here, it might make sense to call out that the default is all options, but specifying a name limits to one option. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-19 Thread Eric Blake
ady decided that query-* commands can add output fields to their dictionary as needed). The name 'config-schema' sounds like it is machine-parseable; can we use a more descriptive name such as 'help-text' that makes it obvious what you are really providing? > +++ b/qmp.c > @@ -24,6 +24,9 @@ > #include "hw/qdev.h" > #include "sysemu/blockdev.h" > #include "qom/qom-qobject.h" > +#include "qemu-options.h" > +#include "net/net.h" What does net/net.h have to do with anything? Overall, looks quite useful, and it is worth getting into 1.5. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command

2013-04-19 Thread Eric Blake
JSON representation of what the command expects, THAT would make it acceptable to add optional arguments to an existing command in a way that libvirt could query to see whether the qemu it is talking to supports the optional arguments. -- Eric Blake eblake redhat com+1-919-301-3266 Libvir

Re: [Qemu-devel] [PATCH] monitor: intervally send down events to guest in hold time

2013-04-20 Thread Eric Blake
nclined to NACK this unless you can give better explanation why send-key should behave differently than bare metal. If anything, the behavior being complained about is a "feature" of the console of the guest being tested, not something where we should change how the hardware be

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-22 Thread Eric Blake
to -netdev, we should also convert -netdev to qemuOpts at that time, so that libvirt would know whether the new feature is available. At any rate, we really DO want introspection, and having it in 1.5 is a worthwhile goal. Even if the introspection turns up empty on legacy options, having it fo

Re: [Qemu-devel] [PATCH] block: Fix build with tracing enabled

2013-04-22 Thread Eric Blake
me = file->filename; > +} else { > +filename = qdict_get_try_str(options, "filename"); > +} > + > +trace_bdrv_open_common(bs, filename ?: "", flags, drv->format_name); Yet another case of a non-C99 gcc extension; but as this is not the first use, I&#

Re: [Qemu-devel] [PATCH] monitor: intervally send down events to guest in hold time

2013-04-22 Thread Eric Blake
On 04/22/2013 01:32 AM, Amos Kong wrote: > On Sat, Apr 20, 2013 at 10:06:28AM -0600, Eric Blake wrote: >> On 04/18/2013 10:44 PM, Amos Kong wrote: >>> (qemu) sendkey a 1000 >>> >>> Current design is that qemu only send one down event to guest, >>> a

Re: [Qemu-devel] KVM call agenda for 2013-04-23

2013-04-22 Thread Eric Blake
lp if we had introspection of QMP commands? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command

2013-04-22 Thread Eric Blake
with fdsets, then libvirt can already achieve pass to pipe - and pass to pipe is indeed the nicest way to then get alternate formats without having to decode lots of JSON, since there are conversion utilities that can take ppm on input and output other formats without having to teach qemu those other

Re: [Qemu-devel] [PATCH v5 01/12] rdma: add documentation

2013-04-22 Thread Eric Blake
in active use, then disabling this feature will cause all 8GB to Trailing whitespace here and elsewhere. scripts/checkpatch.pl doesn't like that. s/disabling/enabling/ > +be pinned and resident in memory. This feature mostly affects the > +bulk-phase round of the migration and can be

Re: [Qemu-devel] [PATCH v5 04/12] rdma: introduce qemu_get_max_size()

2013-04-22 Thread Eric Blake
f->ops->get_max_size(f, f->opaque, > +transferred_bytes, time_spent, max_downtime); > +} > + > +return ((double) (transferred_bytes / time_spent)) * > +max_downtime / 100; Cast to double is too late; you've already suffered from integer divisio

Re: [Qemu-devel] [PATCH v5 10/12] rdma: introduce capability x-rdma-pin-all

2013-04-22 Thread Eric Blake
> footprint is Trailing whitespace, and line longer than 80 columns. You ought to rewrap this, and make sure it passes checkpatch.pl. But since that is whitespace-only, feel free to add: Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [libvirt] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property

2013-04-22 Thread Eric Blake
ax: 1 > item[7].features: 126614521 And this would then be returned as a JSON array containing struct members looking like this: > +{ 'type': 'X86CPUFeatureWordInfo', > + 'data': { 'cpuid-input-eax': 'int', > +'*cpuid-input-ecx

Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code

2013-04-23 Thread Eric Blake
e need to expand the 'MachineInfo' QMP datatype so that 'query-machines' can tell us whether a given machine will support or reject attempts to set 'paging':true during 'dump-guest-memory'? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema

2013-04-23 Thread Eric Blake
On 04/23/2013 07:20 AM, Luiz Capitulino wrote: > On Mon, 22 Apr 2013 09:00:05 -0600 > Eric Blake wrote: > >> At any rate, we really DO want introspection, and having it in 1.5 is a >> worthwhile goal. Even if the introspection turns up empty on legacy >> options, ha

Re: [Qemu-devel] KVM call minutes for 2013-04-23

2013-04-23 Thread Eric Blake
nd than to add parameters to the existing one. At any rate, we're late enough that 'screendump' probably won't be improved in 1.5, so we have the full 1.6 cycle to get it right. Not on the phone call, but a recent mail that is related to the topic - feature detection of whethe

Re: [Qemu-devel] [PATCH 16/16] add cpu-add qmp command and implement CPU hot-add for target-i386

2013-04-23 Thread Eric Blake
should be used. > > There was a proposal for enumerating possible CPUs in previous version, > but it was target specific, and I was convinced to drop it for 1.5 and > aim for generic way to expose this information later. > http://lists.gnu.org/archive/html/qemu-devel/2013-04/msg02286.html &g

Re: [Qemu-devel] [PATCH 0/3] block: block-backup live backup command

2013-04-23 Thread Eric Blake
we don't repeat that mistake, we need to decide whether this should still go into 1.5 with a plan of adding parameters for 1.6, or whether we should add a counterpart query-* command that makes it easy to determine how much of block-backup is supported, or [your suggestion here] -- Er

Re: [Qemu-devel] Adding Disk-Level Introspection to QEMU

2013-04-23 Thread Eric Blake
The existing drive-mirror command can also target an NBD destination, with similar effects. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v5 00/12] rdma: migration support

2013-04-23 Thread Eric Blake
e series that interacts with my current interests (I tend to review anything QMP, because I want to make sure the design will be sane for libvirt interaction, while overlooking things like migration internals because they are black box ops to libvirt if the interface was sane). -- Eric Blake

Re: [Qemu-devel] [PATCH v5 00/12] rdma: migration support

2013-04-23 Thread Eric Blake
osed to be such a list; and since it's a wiki, feel free to add things that you learned here that weren't adequately covered yet. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[Qemu-devel] contribution process [was: [PATCH v5 00/12] rdma: migration support]

2013-04-23 Thread Eric Blake
On 04/23/2013 03:44 PM, Anthony Liguori wrote: > Eric Blake writes: > >> On 04/23/2013 02:15 PM, Michael R. Hines wrote: >>> >>> Would be helpful for new people (like myself) to have a summary >>> of these procedures on the wiki so we don't have to b

Re: [Qemu-devel] [PATCH 0/3] block: block-backup live backup command

2013-04-24 Thread Eric Blake
t it definitely makes more sense if the entire command is waiting for 1.6, since we've already entered soft freeze for 1.5. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] block: Disable driver-specific options for 1.5

2013-04-24 Thread Eric Blake
--- > blockdev.c | 118 > +-- > tests/qemu-iotests/group | 2 +- > 2 files changed, 115 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.

Re: [Qemu-devel] [RESEND PATCH 1/2] qapi: introduce strList and visit_type_strList()

2013-04-24 Thread Eric Blake
> ] > > Signed-off-by: Amos Kong > --- > I used an _ugly_ "#ifndef" to limit it only be defined in qapi-types.h. > do you have some suggestion to fix it? I'm not the maintainer, so you may still want to wait for a better suggestion. But since I personally

Re: [Qemu-devel] [PATCH 2/2] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
option, Error > **errp) > +{ > +ConfigSchemaInfoList *conf_list = NULL, *entry; > +ConfigSchemaInfo *info; > +strList *str_list = NULL, *str_entry; > + int entries, i, j; > + > +entries = ARRAY_SIZE(vm_config_groups); > + > +for (i = 0; i < entries; i++) { >

Re: [Qemu-devel] [RESEND PATCH 1/2] qapi: introduce strList and visit_type_strList()

2013-04-24 Thread Eric Blake
On 04/24/2013 06:47 AM, Amos Kong wrote: > Currently we can only use ['String'] to add string to a list, > it contains some additional JSON structure. Side note - when sending a 2-patch series, it helps to include a 0/2 cover letter. -- Eric Blake eblake redhat com+1-919-

Re: [Qemu-devel] [PATCH 0/3 v3] Support for LED state extension to Qemu VNC server

2013-04-24 Thread Eric Blake
ary, rather than opening n emails just to see if it touches any file I care about). I guess that means I'm asking for a bit of help in further updating the wiki to mention how to have git reliably include a cover letter diffstat, since asking for something without giving a recipe of how to ac

Re: [Qemu-devel] [PATCH 3/3] doc: document the Pseudo-encoding of LED state

2013-04-24 Thread Eric Blake
ists of 3 bits, each bit represents the Caps, Num, and Scroll lock > +key respectively. '1' indicates that the LED should be on and '0' should > +be off. Which bit is which? Is bit 0 the Caps lock LED? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v2 00/12] covert savevm, loadvm and delvm into qapi

2013-04-24 Thread Eric Blake
flicts regarding the algorithm for snapshot lookup, and whether there are any rebase dependencies between your series and Wenchao's. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code

2013-04-24 Thread Eric Blake
t is easy to backport, even if the introspection does not go in at the same time as the original feature, where improved error messages becomes a quality-of-implementation value-added by distro packagers. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Eric Blake
I think returning EXIT_SUCCESS/EXIT_FAILURE instead of 0/1 is a bit nicer at expressing why we chose a positive value; but that would be a separate cleanup to all of qemu-img.c. Hence, I have no problems giving: Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt vir

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
ave hindered the ability to learn which options exist even when you didn't know their name a priori. > >> + 'returns': ['ConfigSchemaInfo']} >> diff --git a/qmp-commands.hx b/qmp-commands.hx >> index 4d65422..19415e4 100644 >> --- a/qmp-

Re: [Qemu-devel] [PATCH 21/21] QMP: add cpu-add command

2013-04-24 Thread Eric Blake
gt; +# @cpu-add > +# > +# Adds CPU with specified ID > +# > +# @id: ID of CPU to be created, valid values [0..max_cpus) > +# > +# Returns: Nothing on success Missing a 'Since 1.5' designation. > +## > +{ 'command': 'cpu-add', 'data': {'id&

Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code

2013-04-24 Thread Eric Blake
for exposing the paging boolean. At the internal C level, qemuMonitorJSONDump hardcodes 'paging' to false in current libvirt.git. I did a bit more digging, and found this libvirt commit: commit d239085e956ca6ca42480e877e98a4302e91b853 Author: Eric Blake Date: Mon Sep 17 13:05:29 201

Re: [Qemu-devel] [PATCH v2 02/12] block: update error reporting for bdrv_snapshot_delete() and related functions

2013-04-24 Thread Eric Blake
ar *snapshot_id, > + Error **errp) > { > /* FIXME: Delete specified snapshot id. */ > -return 0; > +error_setg(errp, "Deleting snapshot is not supported"); Commit message should mention this bug fix. But the code looked okay to me, so:

Re: [Qemu-devel] [PATCH for-1.5] qmp: add query-drive-mirror-capabilities

2013-04-24 Thread Eric Blake
HAVE to rush this into 1.5; libvirt doesn't (yet) expose the buf-size or granularity options on to the end user (although I do have plans to get to that point); and Paolo pointed out that the try-and-fail approach (omit the argument if the user requests the default, and try the argument relying on qemu

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-24 Thread Eric Blake
t; g_free(sn_tab); > -return ret; > +return found; return *sn_info != NULL; > } If you _do_ decide to keep the boolean variable instead of hard-coding a false return and avoiding redundancy by using other variables to determine the result, then at least s/found/ret/, because I

Re: [Qemu-devel] KVM call minutes for 2013-04-23

2013-04-24 Thread Eric Blake
On 04/23/2013 10:06 AM, Eric Blake wrote: >> >> we can change "drive_mirror" to use a new command to see if there >> are the new features. > > drive-mirror changed in 1.4 to add optional buf-size parameter; right > now, libvirt is forced to limit it

Re: [Qemu-devel] [PATCH for-1.5] qmp: add query-drive-mirror-capabilities

2013-04-24 Thread Eric Blake
that looks something like { 'name':'str', 'type':'', 'optional':'boolean', '*default':'', '*documentation':'str' }. If we don't provide filtering, then this JSON output might be quite large, because i

Re: [Qemu-devel] [PATCH for-1.5] qmp: add query-drive-mirror-capabilities

2013-04-24 Thread Eric Blake
On 04/24/2013 03:59 PM, Eric Blake wrote: > With full-blown command introspection, we would want to be asking for a > JSON representation more details about each parameter, in a struct that > looks something like { 'name':'str', 'type':'', &g

Re: [Qemu-devel] [PATCH v2 04/12] qapi: Convert delvm

2013-04-24 Thread Eric Blake
+}, > + > +SQMP > +vm-snapshot-delete > +-- > + > +Delete a snapshot identified by name or id or both. One of the name or id > +is required. It will returns SnapshotInfo of successfully deleted snapshot. s/returns/return/ > @@ -2556,31 +2557,73 @@ int load_vmstate(const char *name) > return 0; > } > > -void do_delvm(Monitor *mon, const QDict *qdict) > +SnapshotInfo *qmp_vm_snapshot_delete(const bool has_name, const char *name, > + const bool has_id, const char *id, > + Error **errp) Actual function looks right to me. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
On 04/24/2013 01:39 PM, Eric Blake wrote: > On 04/24/2013 12:20 PM, Luiz Capitulino wrote: >> On Thu, 25 Apr 2013 01:33:24 +0800 >> Amos Kong wrote: >> >>> Libvirt has no way to probe if an option or property is supported, >>> This patch introdues a new qm

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
ring for later, but I'd rather not have mandatory 'option' as then you have to know in advance which command line options you care about. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-24 Thread Eric Blake
y been switching to default-free coding styles on any switch statement where we expect an enum will grow in the future, for that reason. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [RFC PATCH] Throttle-down guest when live migration does not converge.

2013-04-24 Thread Eric Blake
? Add a new capability to the QMP enum MigrationCapability; default it to off, and let people use the existing QMP command migrate-set-capabilities to request the new auto-converge mode. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org s

Re: [Qemu-devel] [PATCH 3/3] doc: document the Pseudo-encoding of LED state

2013-04-24 Thread Eric Blake
On 04/24/2013 08:25 PM, Lei Li wrote: > On 04/24/2013 10:57 PM, Eric Blake wrote: >> On 04/24/2013 04:12 AM, Lei Li wrote: >>> Signed-off-by: Lei Li >>> --- >>> docs/vnc-ledstate-Pseudo-encoding.txt | 40 >>> +++

Re: [Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Eric Blake
gt;>> +return 1; >>> +} >>> +return 0; >> >> Maybe it's just me, but I think returning EXIT_SUCCESS/EXIT_FAILURE >> instead of 0/1 is a bit nicer at expressing why we chose a positive >> value; but that would be a separate cleanup to

Re: [Qemu-devel] [PATCH v2 03/12] savevm: update bdrv_snapshot_find() to find snapshot by id or name and add error parameter

2013-04-25 Thread Eric Blake
} But I don't know what the existing callers need, to make a decision on whether a signature change is warranted. Again, more reason to defer this series to 1.6. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v2 04/12] qapi: Convert delvm

2013-04-25 Thread Eric Blake
ookup cleaner, removing hard-coded length limits on HMP snapshot display. Yes, getting the common parts clean as one series, then doing two more relatively-independent series of 1. better query output, 2. QMP counterpart to snapshot manipulations, is probably workable. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command

2013-04-25 Thread Eric Blake
ime to fix this now. Agreed - we've added additional information in the QMP types returned by query-* in the past, and it's no problem if we don't expose default values via QMP until improving the C code to track default values in 1.6. For 1.5, let's just focus on exposing

Re: [Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Eric Blake
hat is in-use by a qemu process, and instead only use qemu monitor commands; since qemu-img may see inconsistent state, and worse, any writes that qemu-img do may cause qemu to see inconsistent state and cause corruption to the running guest. -- Eric Blake eblake redhat com+1-919-301-326

Re: [Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Eric Blake
ming Luiz can fix them up while putting on the QMP pull request, without needing to see a v6. Reviewed-by: Eric Blake > +## > +# @CommandLineParameterType: > +# > +# Possible types for an option parameter. > +# > +# @string: accepts a character string > +# > +# @boolean: accepts

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_dev_change_media_cb() public

2013-04-25 Thread Eric Blake
On 04/19/2013 11:47 AM, Luiz Capitulino wrote: > Next commit wants to use it. > > Signed-off-by: Luiz Capitulino > --- > block.c | 3 +-- > include/block/block.h | 1 + > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blak

Re: [Qemu-devel] [PATCH 2/2] block: move bdrv_dev_change_media_cb() to callers that really need it

2013-04-25 Thread Eric Blake
ve_del(). This fixes the problem > commit 9ca1115 intended to fix, plus the spurious events. > > Signed-off-by: Luiz Capitulino > --- > block.c| 2 -- > blockdev.c | 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake

Re: [Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Eric Blake
t;invalid option name: %s", option); > > But I can fix that myself in qmp branch. Based on include/qapi/qmp/qerror.h, the message you would be replacing is: #define QERR_INVALID_OPTION_GROUP \ ERROR_CLASS_GENERIC_ERROR, "There is no option group '%s'" Yeah, "invalid option name: foo" reads better than "There is no option group 'foo'". -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] rbd: Fix use after free in rbd_open()

2013-04-25 Thread Eric Blake
unction where its content isn't needed any more. > > Signed-off-by: Kevin Wolf > --- > block/rbd.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization librar

Re: [Qemu-devel] [PATCH v5] monitor: introduce query-command-line-options

2013-04-25 Thread Eric Blake
ream to worry about, and shouldn't affect what we put into 1.5 upstream). And I just realized: this patch is queued to go into 1.5, and if I read it correctly, then once applied, -drive will no longer be empty in query-command-line-options output: https://lists.gnu.org/archive/html/qemu-devel/

Re: [Qemu-devel] [PATCH v2 05/12] block: update error reporting for bdrv_snapshot_goto() and related functions

2013-04-25 Thread Eric Blake
| 10 +++--- > block/sheepdog.c | 18 -- > include/block/block.h | 5 +++-- > include/block/block_int.h | 5 +++-- > qemu-img.c| 7 ++- > savevm.c | 10 +- > 9 files changed, 66 insertions(+), 51 d

Re: [Qemu-devel] Git head build problem (popcountl vs. system headers)

2013-04-25 Thread Eric Blake
POSIX allows but not requires this: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 says that the str* prefix is reserved in ), a strictly-conforming implementation cannot rely on this extension, and there are systems where you have to get strcasecmp() from , just

Re: [Qemu-devel] [PATCH v2 06/12] block: update error reporting for bdrv_snapshot_list() and related functions

2013-04-25 Thread Eric Blake
- > include/block/block.h | 3 ++- > include/block/block_int.h | 3 ++- > qemu-img.c| 11 --- > savevm.c | 15 +-- > 9 files changed, 60 insertions(+), 32 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake

Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command

2013-04-25 Thread Eric Blake
to 1.6 when we can get the entire design right, than to have 1.5 expose something that can't be reliably used and which might change based on designing the rest of the improvements. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-26 Thread Eric Blake
his code is also dumb. > > Ok, but since the discussion is in public list, no need for CVE then. Wrong. CVEs are useful even for publicly disclosed bugs. It tells people whether they need to upgrade in order to avoid a vulnerability. What we don't need is embargo. But we do need a CVE

Re: [Qemu-devel] [PATCH v3 14/24] instrument: Add internal control interface

2013-04-26 Thread Eric Blake
cent query-command-line-options, putting the reminder comment to keep QMP and C in sync only in the C file.) > +# > +# Since: 1.5 This missed 1.5; it will need to be 1.6 now. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 4/7] block: distinguish id and name in bdrv_find_snapshot()

2013-04-26 Thread Eric Blake
uch a bad file can only be created externally). The goal of a commit message is to convince the readers that a change in semantics is appropriate because the alternative of leaving things broken is worse. [1]https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03501.html -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 3/7] block: move snapshot code in block.c to block/snapshot.c

2013-04-26 Thread Eric Blake
iles changed, 142 insertions(+), 132 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH V18 1/6] docs: document for add-cow file format

2013-04-26 Thread Eric Blake
image file format > +Format of image file. It must be non-empty. It > +is coded in free-form ASCII, and is not > +NUL-terminated. Zero padded on the right. Again, requiring a format contradicts the earlier statement about format probing. How does this compare with Paolo's efforts to design a persistent bitmap for drive-mirror/block-backup use? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 2/3] block: add block_backup QMP command

2013-04-26 Thread Eric Blake
Returns: nothing on success > +# If @device is not a valid block device, DeviceNotFound > +# > +# Since 1.5 1.6, now > +## > +{ 'command': 'block-backup', > + 'data': { 'device': 'str', 'target': 's

Re: [Qemu-devel] [PATCH 2/3] block: add block_backup QMP command

2013-04-26 Thread Eric Blake
On 04/26/2013 04:52 PM, Eric Blake wrote: > On 04/23/2013 10:25 AM, Stefan Hajnoczi wrote: >> @block-backup [hit send too soon] Subject line should mention block-backup, not block_backup. >> +## >> +{ 'command': 'block-backup', >> + 'data&#

Re: [Qemu-devel] [PATCH 2/3] block: add block_backup QMP command

2013-04-26 Thread Eric Blake
b related events in QMP/qmp-events.txt should be updated to refer to the enum instead of also being open-coded 'str'. Will this job be called "backup"? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH] docs/multiple-iothreads.txt: add documentation on IOThread programming

2014-06-09 Thread Eric Blake
monitor are both processed from the > +same event loop which monitors their file descriptors until they become s/loop/loop,/ -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v8 07/14] qemu-img: Implement commit like QMP

2014-06-09 Thread Eric Blake
++ > 2 files changed, 65 insertions(+), 20 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Eric Blake
to QAPI actually let you do > that with a QAPI union while keeping backwards-compatible output for > other fields. Ok to do this later? It should be acceptable for soft > freeze. Correct, use of a discriminated union can add a new 'type' parameter, which in turn controls w

Re: [Qemu-devel] [PATCH v4 12/29] numa: add -numa node, memdev= option

2014-06-09 Thread Eric Blake
QEMU_ARCH_ALL) But this implies both parameters can be used at once. Is it worth rewriting in two lines: "-numa node[,mem=size][,cpus=cpu[-cpu]][,nodeid=node]\n" "-numa node[,memdev=id][,cpus=cpu[-cpu]][,nodeid=node]\n" to make the exclusion clearer? > -to allocate RAM and vCPUs respectively. > +to allocate RAM and vCPU srespectively, and possibly @option{-object} s/vCPU srespectively/vCPUs respectively/ -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Eric Blake
+Show memory devices information. > + > + > +Example (1): > + > +-> { "execute": "query-memdev" } > +<- { "return": [ > + { > + "size": 536870912, > + "host-nodes": [0, 1], > + "policy": "bind" > + }, ...and then only demonstrate 3 in the example. Something's not quite right. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v8 09/14] qemu-img: Enable progress output for commit

2014-06-09 Thread Eric Blake
xi| 2 +- > 3 files changed, 25 insertions(+), 5 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v8 10/14] qemu-img: Specify backing file for commit

2014-06-09 Thread Eric Blake
gt; qemu-img-cmds.hx | 4 ++-- > qemu-img.c | 24 +--- > qemu-img.texi| 9 - > 3 files changed, 27 insertions(+), 10 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library ht

Re: [Qemu-devel] [PATCH v8 11/14] iotests: Add _filter_qemu_img_map

2014-06-09 Thread Eric Blake
may have been shorter to write, but this does indeed appear to do the trick for all but a perverse person that names their backing files with substrings that include something like '/path/to/Mapped to gotcha/'. Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v8 12/14] iotests: Add test for backing-chain commits

2014-06-09 Thread Eric Blake
ts/qemu-iotests/group | 1 + > 3 files changed, 242 insertions(+) > create mode 100755 tests/qemu-iotests/094 > create mode 100644 tests/qemu-iotests/094.out > The commit message can be touched up by whoever does the PULL request, so: Reviewed-by: Eric Blake -- Eric Blak

Re: [Qemu-devel] [PATCH v8 13/14] iotests: Add test for qcow2's bdrv_make_empty

2014-06-09 Thread Eric Blake
sts/qemu-iotests/095.out | 26 + > tests/qemu-iotests/group | 1 + > 3 files changed, 99 insertions(+) > create mode 100755 tests/qemu-iotests/095 > create mode 100644 tests/qemu-iotests/095.out > Reviewed-by: Eric Blake -- Eric Blake eblake redhat c

Re: [Qemu-devel] [PATCH v7 2/3] block: Add node-name and to-replace-node-name arguments to drive-mirror

2014-06-09 Thread Eric Blake
@ > ## > { 'command': 'drive-mirror', >'data': { 'device': 'str', 'target': 'str', '*format': 'str', > +'*new-node-name': 'str', '*to-replace-node-name'

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Eric Blake
char *name'. I am casting to 'char * > now', is it better? Okay, I see. Sometimes, I like to put in a comment /* cast away const */ to make it obvious why I'm doing things like that. It also serves as a spur to investigate a couple of things: 1) should the callback signa

Re: [Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size

2014-06-09 Thread Eric Blake
n", error_report() should not include trailing \n > + numa_total, ram_size); > +exit(1); Not your fault that this file is full of exit(1), but it would be nice to have a cleanup patch someday that uses EXIT_FAILURE. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size

2014-06-09 Thread Eric Blake
On 06/09/2014 08:29 PM, Hu Tao wrote: > On Mon, Jun 09, 2014 at 05:02:51PM -0600, Eric Blake wrote: >> On 06/09/2014 04:25 AM, Hu Tao wrote: >>> From: Wanlong Gao >>> >>> If the total number of the assigned numa nodes memory is not >>> equal to the as

Re: [Qemu-devel] [PATCH v10-fix 15/18] Add the vhost-user netdev backend to the command line

2014-06-10 Thread Eric Blake
:'str', > +'*vhost-force':'bool' } } [1]...and here you call it vhost-force... > +Establish a vhost-user netdev, backed by a chardev @var{id}. The chardev > should > +be a unix domain socket backed one. The vhost-user uses a specifical

Re: [Qemu-devel] [PATCH v3 1/4] json-parser: drop superfluous assignment for token variable

2014-06-10 Thread Eric Blake
On 06/10/2014 03:20 AM, arei.gong...@huawei.com wrote: > From: Gonglei > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > qobject/json-parser.c | 15 ++- > 1 file changed, 2 insertions(+), 13 deletions(-) Reviewed-by: Eric Blake > @@ -461,10

Re: [Qemu-devel] [PATCH] add command to position mouse pointer in absolute mode

2014-06-10 Thread Eric Blake
-only commands are allowed. Luiz? Correct - please expose this through QMP. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCHv4] migration: catch unknown flags in ram_load

2014-06-10 Thread Eric Blake
pected flag combinations as invalid, even when each flag is in isolation okay, rather than the current behavior of silently prioritizing one flag and ignoring the other? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCHv4] migration: catch unknown flags in ram_load

2014-06-10 Thread Eric Blake
On 06/10/2014 06:55 AM, Eric Blake wrote: > On 06/10/2014 03:29 AM, Peter Lieven wrote: >> if a saved vm has unknown flags in the memory data qemu >> currently simply ignores this flag and continues which >> yields in an unpredictable result. >> >> This patch cat

Re: [Qemu-devel] [PATCH v10-fix 15/18] Add the vhost-user netdev backend to the command line

2014-06-10 Thread Eric Blake
On 06/10/2014 07:03 AM, Michael S. Tsirkin wrote: > On Tue, Jun 10, 2014 at 06:11:16AM -0600, Eric Blake wrote: >> On 06/10/2014 04:02 AM, Nikolay Nikolaev wrote: >>> The supplied chardev id will be inspected for supported options. Only >>> a socket backend, with a s

Re: [Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line

2014-06-10 Thread Eric Blake
ed-off-by: Nikolay Nikolaev > --- > net/vhost-user.c | 18 ++ > qapi-schema.json |4 ++-- > 2 files changed, 8 insertions(+), 14 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http:

Re: [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback

2014-06-10 Thread Eric Blake
nt, since we still don't have global qapi introspection, the addition of a new command is nicer than the addition of an optional parameter. But I definitely agree that we have a discrepancy between HMP being able to specify a current CPU, vs. QMP being unable to direct which CPU gets the interrupt. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v2 1/4] blockjob: Add block_job_yield()

2014-06-10 Thread Eric Blake
gt; 2 files changed, 22 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v2 2/4] mirror: Go through ready -> complete process for 0 len image

2014-06-10 Thread Eric Blake
es > management software. > > Let's do the same thing when seeing a 0-length image: report ready > immediately; wait for block-job-cancel or block-job-complete; clear the > cancel flag as existing non-zero image synced case (cancelled after > ready); then jump to the exit.

Re: [Qemu-devel] [PATCH v2 4/4] qemu-iotests: Test 0-length image for mirror

2014-06-10 Thread Eric Blake
041.out | 4 ++-- > 2 files changed, 8 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v6 1/4] cpus: Define callback for QEMU "nmi" command

2014-06-11 Thread Eric Blake
> inject-nmi > -- > > -Inject an NMI on guest's CPUs. > +Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). Oh, I see the problem. The acronym 'NMI' is pronounced with a leading vowel (an "en-em-eye"), but the expansion is pronounced with a consonant (a non-maskable interrupt), so the correct article depends on whether you are spelling things out. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 1/9] block: Create bdrv_fill_options()

2014-06-11 Thread Eric Blake
drv = bdrv_find_format(drvname); ...and this does it again. Should this second assignment be inside an else{}? > +static int bdrv_file_open(BlockDriverState *bs, const char *filename, > + QDict **options, int flags, Error **errp) > + > +drv = bdrv_find_format(drvname); > +if (!drv) { > +error_setg(errp, "Unknown driver '%s'", drvname); > +ret = -ENOENT; > +goto fail; > +} Isn't this error check redundant with the one already done in bdrv_fill_options()? You could probably just use assert(drv) -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 2/9] block: Move bdrv_fill_options() call to bdrv_open()

2014-06-11 Thread Eric Blake
Dict **options, const char *filename, > +static int bdrv_fill_options(QDict **options, const char *filename, int > flags, > Error **errp) Ah, this fixes one of my findings on 1/9. Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-91

Re: [Qemu-devel] [PATCH 4/9] block: Always pass driver name through options QDict

2014-06-11 Thread Eric Blake
h the file name from the options QDict if necessary */ > -if (filename) { > +if (protocol && filename) { > if (filename && !qdict_haskey(*options, "filename")) { Slight conflict here when you clean up the dead 'filename &&' in patch 1;

Re: [Qemu-devel] [PATCH 3/9] block: Move json: parsing to bdrv_fill_options()

2014-06-11 Thread Eric Blake
On 06/11/2014 08:04 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block.c | 88 > + > 1 file changed, 45 insertions(+), 43 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com

<    5   6   7   8   9   10   11   12   13   14   >