Re: [Qemu-devel] [PATCH v3] add input-send-event command

2014-09-29 Thread Eric Blake
handler not found for " > + "event type %s", > +InputEventKind_lookup[event->kind]); > +return; Ouch. You can return mid-loop. I'd be more comfortable with a two-pass algorithm (first pass ensures all list elements have a handler, second actually calls qemu_input_event_send) or with a return that gives an integer count of how many list items were processed. -- 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] util: Emancipate id_wellformed() from QemuOpts

2014-09-30 Thread Eric Blake
35 insertions(+), 24 deletions(-) > create mode 100644 util/id.c 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 4/5] qmp: print descriptions of object properties

2014-09-30 Thread Eric Blake
qapi-schema.json | 4 +++- > qdev-monitor.c | 7 ++- > qmp.c| 13 ++--- > 3 files changed, 19 insertions(+), 5 deletions(-) > Reviewed-by: Eric Blake (would be nice if qmp-commands.hx had an example for device-list-properties, but that can be a separate pa

Re: [Qemu-devel] [PATCH 1/3] iotests: Use _img_info

2014-09-30 Thread Eric Blake
++-- > tests/qemu-iotests/095.out | 16 -- > 6 files changed, 26 insertions(+), 68 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 2/3] qapi: Add corrupt field to ImageInfoSpecificQCow2

2014-09-30 Thread Eric Blake
put accordingly. > > Suggested-by: Eric Blake Thanks for tackling this :) > Signed-off-by: Max Reitz > --- > block/qcow2.c | 3 +++ > qapi/block-core.json | 6 +- > tests/qemu-iotests/065 | 12 ++-- > tests/qemu-iotests/067.out | 10 +

Re: [Qemu-devel] [PATCH 3/3] iotests: qemu-img info output for corrupt image

2014-09-30 Thread Eric Blake
es changed, 12 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 v4] add input-send-event command

2014-09-30 Thread Eric Blake
+ > qmp-commands.hx | 63 > ++ > ui/input.c | 37 + > 3 files changed, 117 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization l

Re: [Qemu-devel] [PATCH] virtio-balloon: Tweak recent fix for integer overflow

2014-10-01 Thread Eric Blake
't when unsigned is 64 bits. Purely theoretical; I'm not > aware of such a system. Limit it to UINT32_MAX instead. > > Signed-off-by: Markus Armbruster > --- > hw/virtio/virtio-balloon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blak

Re: [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to client sockets

2014-10-01 Thread Eric Blake
verState > *chr, Error **errp) > > if (s->is_listen) { > fd = socket_listen(s->addr, errp); > -} else { > +} else if (s->reconnect_time) { > + fd = socket_connect(s->addr, errp, qemu_chr_socket_connected, chr); > + return (f

Re: [Qemu-devel] [PATCH 2/6] blockdev-test: Use single rather than double quotes in QMP

2014-10-02 Thread Eric Blake
n to JSON), then this is fine; otherwise, I'd prefer that we use double quotes in QMP. But if we decide single quotes are tolerable, 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 3/6] blockdev-test: Clean up bogus drive_add argument

2014-10-02 Thread Eric Blake
off-by: Markus Armbruster > --- > tests/drive_del-test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) 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 1/6] drive_del-test: Merge of qdev-monitor-test, blockdev-test

2014-10-02 Thread Eric Blake
=> drive_del-test.c} (56%) Reviewed-by: Eric Blake > --- a/tests/qdev-monitor-test.c > +++ b/tests/drive_del-test.c > @@ -1,5 +1,5 @@ > /* > - * qdev-monitor.c test cases > + * blockdev.c test cases > * > * Copyright (C) 2013 Red Hat Inc. Worth bumping this to i

Re: [Qemu-devel] [PATCH 4/6] blockdev-test: Simplify by using g_assert_cmpstr()

2014-10-02 Thread Eric Blake
On 10/02/2014 08:51 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > tests/drive_del-test.c | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization

Re: [Qemu-devel] [PATCH 5/6] blockdev-test: Factor out some common code into helpers

2014-10-02 Thread Eric Blake
> + > +response = qmp("{'execute': 'human-monitor-command'," > + " 'arguments': {" > + " 'command-line': 'drive_add 0 if=none,id=drive0'" > + "}}"); I&#x

Re: [Qemu-devel] [PATCH 6/6] blockdev-test: Test device_del after drive_del

2014-10-02 Thread Eric Blake
n of single quotes in QMP, but it's existing style. > +static void test_drive_del_device_del(void) > +{ > +/* Start with a drive used by an device that unplugs instantaneously */ s/an device/a device/ New tests are always good; with the typo fix: Reviewed-by: Eric Blake -- Eric Blake ebla

Re: [Qemu-devel] [PATCH 1/2] qemu-char: Fix reconnect socket error reporting

2014-10-06 Thread Eric Blake
ge printed in check_report_connect_error, you are probably doing translators a disservice by splitting a sentence into two parts separated by a number of lines of code. (Spoken by one who has never contributed a translation, so take with a grain of salt) > return; > } > > +s->connect_err_reported = 0; s/0/false/ -- 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 20/47] Add migration-capability boolean for postcopy-ram.

2014-10-06 Thread Eric Blake
On 10/03/2014 11:47 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Eric Blake > --- > include/migration/migration.h | 1 + > migration.c | 9 + >

Re: [Qemu-devel] [PATCH] Revert "New QMP command query-cpu-max and HMP command cpu_max"

2013-04-09 Thread Eric Blake
.hx | 2 -- > hmp.c| 8 > hmp.h| 1 - > monitor.c| 7 --- > qapi-schema.json | 11 --- > qmp-commands.hx | 22 -- > vl.c | 5 - > 7 files changed, 56 deletions(-) Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v4 07/11] qapi: Convert savevm

2013-04-09 Thread Eric Blake
tag always be supplied, then we cannot create qcow2 files with a snapshot that lacks a tag using just QMP; but even if we do that, we STILL have to support use of existing qcow2 files that were created by earlier qemu and/or other tools that have snapshots without a tag. -- 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 07/11] qapi: Convert savevm

2013-04-09 Thread Eric Blake
nerate a tag. I'm still on the fence on whether to always have a tag in place (whether by QMP generation or by mandatory argument) vs. allowing anonymous snapshots. But again, libvirt always names its snapshots, and I trust your judgment as maintainer of this area of code in which way we should go. -- 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/11] block: add error parameter to del_existing_snapshots()

2013-04-10 Thread Eric Blake
unless we set a coding standard in HACKING telling which way new code should use. I can live with the churn in this commit as long as you are changing other things in the same hunk at the same time, but I wasn't specifically asking for capitalization changes. -- Eric Blake eblake

Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command

2013-04-10 Thread Eric Blake
'enum': 'SnapshotLookup', 'data': [ 'id-only', 'tag-only', 'default' ] } { 'command': 'vm-snapshot-load', 'data': { 'name': 'str', '*mode': 'SnapshotLookup' } } where m

Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command

2013-04-10 Thread Eric Blake
On 04/10/2013 06:40 AM, Luiz Capitulino wrote: > On Wed, 10 Apr 2013 06:24:11 -0600 > Eric Blake wrote: > >>> - If you want to overwrite an existing snapshot, you could specify >>> the 'id' or the 'name' argument or both of them and also yo

Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command

2013-04-10 Thread Eric Blake
vior as the QMP command Except that with HMP, arguments are positional. You can't provide 'id' in isolation; by listing id:i? second, the parser requires that the first argument encountered is a name. I think a better interface might be: HMP loadvm: - args_type = "id:-

[Qemu-devel] [PATCH] qapi: use valid JSON in schema

2013-04-10 Thread Eric Blake
* qapi-schema.json: JSON doesn't allow trailing commas. Signed-off-by: Eric Blake --- a multi-line regex search for ',[ \n]*[]}]' didn't turn up any other violations qapi-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi-schema.json b/qa

Re: [Qemu-devel] [RFC PATCH RDMA support v1: 07/13] introduce capability for dynamic chunk registration

2013-04-10 Thread Eric Blake
Enabled by default (since 1.5) > ## > { 'enum': 'MigrationCapability', > - 'data': ['xbzrle'] } > + 'data': ['xbzrle', 'chunk_register_destination'] } QMP prefers '-' over

Re: [Qemu-devel] [RFC PATCH RDMA support v1: 10/13] introduce new command migrate_check_for_zero

2013-04-10 Thread Eric Blake
#x27;command': 'migrate_check_for_zero', 'data': {'value': 'bool'} } You can set the capability, but how do you query its current setting? I dislike write-only interfaces. -- 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 RDMA support v1: 12/13] updated protocol documentation

2013-04-10 Thread Eric Blake
and link performing a worst-case stress test: s/infinband/infiniband/ > + > +RDMA Throughput With $ stress --vm-bytes 1024M --vm 1 --vm-keep > +Approximately 30 gpbs (little better than the paper) which paper? Call that out in your high-level summary ... > + > +An *exhaustive* paper (2010) shows additional performance details > +linked on the QEMU wiki: Missing the actual reference? And it would help to mention it at the beginning of the file. -- 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 RDMA support v1: 10/13] introduce new command migrate_check_for_zero

2013-04-11 Thread Eric Blake
On 04/11/2013 01:52 AM, Orit Wasserman wrote: > On 04/11/2013 05:39 AM, Michael R. Hines wrote: >> On 04/10/2013 10:26 PM, Eric Blake wrote: >>> >>> New QMP commands should be named with '-' rather than '_', as in >>> 'migrate-chec

Re: [Qemu-devel] [PATCH V11 09/17] qmp: add interface query-snapshots

2013-04-11 Thread Eric Blake
he behavior of management apps written against the 1.3 interface when dealing with ImageInfo. If you want to avoid a (sec/nsec) pair, you would have to invent a new type instead of reusing the already-existing SnapshotInfo. Hmm, as I typed that, I did another search of qemu-schema.json - we have the type 'ImageInfo' defined, but none of the existing 'command's ever call out the use of that type. Is it a type we are only using internally to date, and where this is the first QMP command that would actually expose SnapshotInfo or ImageInfo to a management app? Then maybe we _CAN_ modify SnapshotInfo, clean up all the internal code, and provide a saner type for the first time that QMP can actually use it. -- 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] net: introduce monitor command to query mactables

2013-04-11 Thread Eric Blake
5 > +## > +{ 'command': 'query-mac-table', 'returns': ['MacTableInfo'] } Seems useful. > +-> { "execute": "query-mac-table"} > +<- {"return": [ > +{ > +"name": "virtio-net-pci.0", > +&qu

Re: [Qemu-devel] [RFC PATCH RDMA support v1: 10/13] introduce new command migrate_check_for_zero

2013-04-11 Thread Eric Blake
to rush it into 1.5 and regret the design, and no need to hold up getting RDMA into 1.5 just because of a debate about a knob that can be deferred to a later release when we've had more time to play with RDMA. -- 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 RDMA support v1: 10/13] introduce new command migrate_check_for_zero

2013-04-11 Thread Eric Blake
but that sounds like it is making the internal state use a sane default based on existing external interface, and should be fine. -- 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 V11 09/17] qmp: add interface query-snapshots

2013-04-11 Thread Eric Blake
nging that output to delete a field might break existing tools; adding a field might be safer, but then you'd have redundant information in the old style for old tools, as well as the added field. -- 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] qemu-img: refuse to compress files with invalid size

2013-04-12 Thread Eric Blake
priate, but does that mean we have to reject the file completely if it wasn't sized to a multiple to begin with? -- 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 01/15] block: Fail gracefully when using a format driver on protocol level

2013-04-12 Thread Eric Blake
ve file=TEST_DIR/t.qcow2,file.driver=qcow2: The 'qcow2' block > driver is not suitable for the bottom level > +qemu: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2: could not open disk > image TEST_DIR/t.qcow2: Invalid argument Maybe a better error message would be this? A

Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command

2013-04-15 Thread Eric Blake
On 04/15/2013 06:10 AM, Kevin Wolf wrote: > Am 11.04.2013 um 11:20 hat Markus Armbruster geschrieben: >> [Cc: Wenchao Xia because of overlap with his work] >> >> Eric Blake writes: >> >>> On 04/10/2013 08:05 AM, Pavel Hrdina wrote: >>>> Her

Re: [Qemu-devel] [PATCH 4/4] qemu-iotests: add 053 unaligned compressed image size test

2013-04-15 Thread Eric Blake
e converted image still reports that the guest sees a size of 512, to prove that the virtual size was not expanded as a result of compression tail padding? With that question answered, you have: Series: 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 02/15] block: Add driver-specific options for backing files

2013-04-15 Thread Eric Blake
+++ > block/mirror.c| 2 +- > include/block/block.h | 2 +- > 3 files changed, 25 insertions(+), 6 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 03/15] block: Enable filename option

2013-04-15 Thread Eric Blake
-- > 1 file changed, 27 insertions(+), 4 deletions(-) Quite a few lines added for a net reduction in parameters, but the results look nice. 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 04/15] raw-posix: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
l, so I have no qualms with adding this to a fixed version: 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 05/15] raw-win32: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
e from 4/15. Same caveat about it being trivial enough to add this once fixed: 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 06/15] blkdebug: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
On 04/12/2013 02:47 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/blkdebug.c | 103 > +-- > 1 file changed, 77 insertions(+), 26 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com

Re: [Qemu-devel] [PATCH 07/15] blkverify: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
eturn; > } > -filename += strlen("blkverify:"); > > /* Parse the raw image filename */ > c = strchr(filename, ':'); > if (c == NULL) { > -return -EINVAL; > +error_setg(errp, "blkdebug requires raw copy and origina

Re: [Qemu-devel] [PATCH 08/15] curl: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
efer indenting the entire BlockDriver initialization consistently, as done in this patch, but didn't ding patch 6 or 7 at the time because they looked innocuous enough in isolation). Since I only called out whitespace issues (and even then, only for commits other than this) and a weakness in the commit message, the code itself deserves: 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 09/15] gluster: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
code, should you re-indent the second line of this signature? > + > +filename = qemu_opt_get(opts, "filename"); > + > > s->glfs = qemu_gluster_init(gconf, filename); Why the two blank lines? Comments deal only with whitespace, so feel free to add: Reviewed

Re: [Qemu-devel] [PATCH 10/15] iscsi: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
by: Kevin Wolf > --- > block/iscsi.c | 39 +-- > 1 file changed, 37 insertions(+), 2 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 11/15] rbd: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
by: Kevin Wolf > --- > block/rbd.c | 31 ++- > 1 file changed, 30 insertions(+), 1 deletion(-) > 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 12/15] sheepdog: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
by: Kevin Wolf > --- > block/sheepdog.c | 32 +++- > 1 file changed, 31 insertions(+), 1 deletion(-) > 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 13/15] vvfat: Use bdrv_open options instead of filename

2013-04-15 Thread Eric Blake
quot;, > .instance_size = sizeof(BDRVVVFATState), > -.bdrv_file_open = vvfat_open, > -.bdrv_rebind = vvfat_rebind, > +.bdrv_parse_filename= vvfat_parse_filename, > +.bdrv_file_open = vvfat_open, > +.bdrv_rebind= vvfat_rebind, > .

Re: [Qemu-devel] [PATCH 14/15] block: Remove filename parameter from .bdrv_file_open()

2013-04-15 Thread Eric Blake
e to avoid the churn of touching it up twice). 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 15/15] block: Allow overriding backing.file.filename

2013-04-15 Thread Eric Blake
eview that, as libvirt is still reluctant to use fdsets for image manipulation on the command line if we can't follow it up with hot-plug manipulation, but I love where this is heading. 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 6/7] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h

2013-04-15 Thread Eric Blake
On 04/15/2013 02:47 PM, Laszlo Ersek wrote: > From: Michael S. Tsirkin > > > Signed-off-by: Laszlo Ersek If Michael is the original author, don't we need his S-o-b? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [Qemu-devel] [PATCH v2 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients

2013-04-15 Thread Eric Blake
acpi.c Sorry - I just did a superficial review of the commit message, but this is in code that I'm not familiar enough with to do any sort of formal review. -- 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] tpm: Simplify creation of cancel path

2013-04-15 Thread Eric Blake
m/tpm_passthrough.c | 74 > +++--- > 1 file changed, 17 insertions(+), 57 deletions(-) Reviewed-by: Eric Blake and matches a counterpart change you proposed for libvirt. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.

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

2013-04-15 Thread Eric Blake
t; + Should be usable from libvirt's perspective, even if hot-plugging more than one cpu requires more than one QMP call. Do we have a counterpart QMP call to easily determine which cpu ids can still be hotplugged? If so, should we mention that in the documentation of this command? -- 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] qemu-iotests: Fix _filter_qemu

2013-04-16 Thread Eric Blake
yping: _filter_qemu() { sed "s#^${QEMU_PROG##*/}:#QEMU_PROG#" } That said, your more verbose version is still functionally correct, so you can 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] [qapi] Cannot use list of strings

2013-04-16 Thread Eric Blake
"str": "01:80:c2:00:00:21", > "str": "00:00:00:00:00:00" > ] No. This is not valid JSON. ':' is only allowed inside {}. The point of an array is to either have an array of objects (as in

Re: [Qemu-devel] [PATCH] Fix warnings suppressors to honor --disable-werror

2013-04-16 Thread Eric Blake
roublesome code...] > #pragma GCC diagnostic pop Older gcc does not understand #pragma GCC diagnostic push. Are you sure this solution works with all versions of gcc in common use for compiling qemu? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [Qemu-devel] [PULL 4/8] rdma: introduce capability for chunk registration

2013-04-16 Thread Eric Blake
7;chunk_register_destination'] } > > x-chunk_register_destination. > > Or better, "x-rdma_chunk_registration". Or better, "x-rdma-chunk-registration", since QMP should prefer the use of '-' over '_'. -- 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] qemu-iotests: Fix _filter_qemu

2013-04-16 Thread Eric Blake
that anyone will run the testsuite while trying to stress extreme corner-case $QEMU_PROG naming conventions, I can certainly live with keeping $(basename $QEMU_PROG) form for legibility. -- 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/5] block: move input parsing code in qmp_transaction()

2013-04-16 Thread Eric Blake
19 insertions(+), 19 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 V2 1/5] block: package preparation code in qmp_transaction()

2013-04-16 Thread Eric Blake
input parsing is not touched, to make it easier in review. > > Signed-off-by: Wenchao Xia > --- > blockdev.c | 146 +-- > 1 files changed, 82 insertions(+), 64 deletions(-) > -- Eric Blake eblake redhat com+

Re: [Qemu-devel] [PATCH V2 3/5] block: package committing code in qmp_transaction()

2013-04-16 Thread Eric Blake
On 04/13/2013 05:11 AM, Wenchao Xia wrote: > The code is simply moved into a separate function. > > Signed-off-by: Wenchao Xia > --- > blockdev.c | 20 +--- > 1 files changed, 13 insertions(+), 7 deletions(-) Reviewed-by: Eric Blake -- Eric Blake

Re: [Qemu-devel] [PATCH V2 4/5] block: package rolling back code in qmp_transaction()

2013-04-16 Thread Eric Blake
On 04/13/2013 05:11 AM, Wenchao Xia wrote: In the subject: s/rolling back/rollback/ > Signed-off-by: Wenchao Xia > --- > blockdev.c | 12 +--- > 1 files changed, 9 insertions(+), 3 deletions(-) With the subject fix, feel free to add: Reviewed-by: Eric Blake --

Re: [Qemu-devel] [PATCH V2 5/5] block: make all steps in qmp_transaction() as callback

2013-04-16 Thread Eric Blake
> +typedef struct BdrvActionOps { > +/* Prepare the work, must NOT be NULL. */ > +int (*prepare)(BlockdevAction *action, void **p_opaque, Error **errp); Based on the comments on 1/5, should prepare have a void signature and just let errp serve to indicate failure? -- Eric Blake ebl

Re: [Qemu-devel] [PATCH 5/7] i440fx-test: add test to compare default register values

2013-04-16 Thread Eric Blake
e | 2 + > tests/i440fx-test.c | 148 > > 2 files changed, 150 insertions(+) > create mode 100644 tests/i440fx-test.c > -- 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 5/7] i440fx-test: add test to compare default register values

2013-04-16 Thread Eric Blake
On 04/16/2013 09:56 AM, Eric Blake wrote: > On 04/16/2013 08:45 AM, Anthony Liguori wrote: >> This test compares all of the default register values against the >> spec. It turns out we deviate in quite a few places. These >> places are really only visible to the BIOS though

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

2013-04-16 Thread Eric Blake
50 --- > block/sheepdog.c | 61 > hmp-commands.hx | 48 +++--- > hmp.c | 119 +++ > hmp.h | 3 + > include/block/block.h | 17 ++- > include/block/block_int.h | 17 ++- > include/sysemu/sysemu.h | 12 +- > migration.c | 15 +- > monitor.c | 12 -- > qapi-schema.json | 54 +++ > qemu-img.c| 54 --- > qmp-commands.hx | 127 +++- > savevm.c | 363 > +- > vl.c | 7 +- > 18 files changed, 782 insertions(+), 364 deletions(-) > -- 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 01/11] qemu-img: introduce qemu_img_handle_error()

2013-04-16 Thread Eric Blake
, 11 insertions(+), 6 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 02/11] block: update error reporting for bdrv_snapshot_delete() and related functions

2013-04-16 Thread Eric Blake
's probably better done as a separate commit. As my findings are best addressed in other patches, I'm okay with this patch as-is, and you can use: 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 03/11] savevm: update bdrv_snapshot_find() to find snapshot by id or name

2013-04-16 Thread Eric Blake
i, ret, available; > +int nb_sns, i, available; > int total; > int *available_snapshots; > char buf[256]; > @@ -2505,8 +2532,8 @@ void do_info_snapshots(Monitor *mon, const QDict *qdict) > > while ((bs1 = bdrv_next(bs1))) { > if (b

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

2013-04-16 Thread Eric Blake
to succeed with no data, you still have to return {}. Maybe I'm not familiar enough with QMP, and you can get away with this after all. On the other hand, I'd much rather have error reporting here anyways, since libvirt will be using QMP, and hiding the error to only occur in HMP means t

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

2013-04-16 Thread Eric Blake
evant (and changing from -1 to 0 makes no difference to this code doing a short-circuit). But again, calling that out as a contract, where we can verify that each implementation of the callback function obeys the contract, would make me feel a bit better. > +++ b/savevm.c > @@ -2206,7 +2206,7 @@ static int bdrv_snapshot_find(BlockDriverState *bs, > QEMUSnapshotInfo *sn_info, > return found; > } > > -nb_sns = bdrv_snapshot_list(bs, &sn_tab); > +nb_sns = bdrv_snapshot_list(bs, &sn_tab, NULL); > if (nb_sns < 0) { > return found; Oops. qemu-img wasn't the only caller. Here, changing -1 to 0 on error return means we fall through instead of returning 0 early. Did you mean for that to happen? Calling with NULL says you don't care about error reporting - is that 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 06/11] savevm: update error reporting for qemu_loadvm_state()

2013-04-16 Thread Eric Blake
(errp, "saveVM v2 format is obsolete and don't work > anymore"); As long as you are touching this, fix the grammar: s/don't/doesn't/ As my findings were pre-existing problems: 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

[Qemu-devel] [PATCH] migration: reflect incoming failure to shell

2013-04-16 Thread Eric Blake
Management apps like libvirt don't know to pay attention to stderr unless there is a non-zero exit status. * migration.c (process_incoming_migration_co): Exit with non-zero status on failure. Signed-off-by: Eric Blake --- Noticed while reviewing: https://lists.gnu.org/archive/html/qemu-

Re: [Qemu-devel] [PATCH V12 14/18] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump()

2013-04-16 Thread Eric Blake
p code later, besides qemu-img code. Not a full review (yet), but can we get this particular cleanup rebased to be done first in isolation, since Pavel's patches would benefit from being based on top of this cleanup as well? https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03287.html -- Er

Re: [Qemu-devel] [PATCH 07/11] qapi: Convert loadvm

2013-04-16 Thread Eric Blake
port("Device '%s' does not have the requested snapshot > '%s'", > - bdrv_get_device_name(bs), name); > -return -ENOENT; > +if (!bdrv_snapshot_find(bs, &sn, name, id, false)) { > +retur

Re: [Qemu-devel] [PATCH 08/11] block: update error reporting for bdrv_snapshot_create() and related functions

2013-04-16 Thread Eric Blake
ondition is probably dead code, if the QMP command never attempts to generate id_str itself. At any rate, the conversion to errp looks reasonable. 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 09/11] savevm: update error reporting off qemu_savevm_state() and related functions

2013-04-16 Thread Eric Blake
; 3 files changed, 26 insertions(+), 25 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 V12 02/18] block: distinguish id and name in bdrv_find_snapshot()

2013-04-16 Thread Eric Blake
ed series containing both of your improvements as a single series, so that we are only changing bdrv_snapshot_list semantics once. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PULL v3 3/7] rdma: introduce capability for chunk registration

2013-04-17 Thread Eric Blake
t; - 'data': ['xbzrle'] } > + 'data': ['xbzrle', 'x-chunk-register-destination'] } But given the x- prefix, which is already a designation that the option is experimental and may be pulled, I can live without documentation here (where JUST t

Re: [Qemu-devel] [PULL v3 7/7] rdma: add documentation

2013-04-17 Thread Eric Blake
ng RDMA. > +3. Also, some form of balloon-device usage tracking would also > + help alleviate some issues. Maybe also mention that the protocol will be renamed from -incoming x-rdma:... to -incoming rdma:... when it has been through more testing to stabilize the protocol. -- Eric Blake

Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find()

2013-04-17 Thread Eric Blake
the idea of find() setting errp on lookup failure. Callers can ignore errors in situations where a failed lookup triggers a reasonable fallback, but in case the caller wants to report an error, the lower down that we generate an error message, the more likely the error message is to contain fu

Re: [Qemu-devel] [PATCH 11/11] savevm: remove backward compatibility from bdrv_snapshot_find()

2013-04-17 Thread Eric Blake
On 04/17/2013 12:14 PM, Eric Blake wrote: > Or, written another way, to implement the same results in only two coded > loops: Missed a line: > > if name is set: > if there is a snapshot with that name (loop 1): > if id is set: >

Re: [Qemu-devel] [PATCH V12 02/18] block: distinguish id and name in bdrv_find_snapshot()

2013-04-17 Thread Eric Blake
On 04/16/2013 07:09 PM, Eric Blake wrote: > On 04/13/2013 02:56 AM, Wenchao Xia wrote: >> To make it clear about id and name in searching, the API is changed >> a bit to distinguish them, and caller can choose to search by id or name. >> Searching will be done with higher

Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list()

2013-04-17 Thread Eric Blake
> > Signed-off-by: Wenchao Xia > Reviewed-by: Eric Blake > Reviewed-by: Kevin Wolf > --- > + > +/* Check logic is connected with load_vmstate(): > + Only check the devices that can snapshot, other devices that can't > + take snapshot, fo

Re: [Qemu-devel] [PATCH V12 07/18] block: change VM snapshot checking logic

2013-04-17 Thread Eric Blake
et of/ s/got/listed/ > in "qemu-img info" as static snapshot info, and this patch clearly > tips it. s/tips/identifies/ > > Signed-off-by: Wenchao Xia > --- > block/qapi.c | 13 - > 1 files changed, 12 insertions(+), 1 deletions(-) Reviewed-by: Er

Re: [Qemu-devel] [PATCH V12 08/18] block: add image info query function bdrv_query_image_info()

2013-04-17 Thread Eric Blake
goto err; But then this caller would need to pass in a local error parameter, where Pavel's idea of qemu_img_handle_error would make it easier. https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03288.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 V12 10/18] qmp: add interface query-snapshots

2013-04-17 Thread Eric Blake
of all snapshots Does it really share the same snapshot ID across all block devices, or is it just the snapshot tag that gets shared? That is, if I have just disk a, take one snapshot, then hotplug disk b, then take another snapshot, doesn't that leave me with: disk a: id 1 tag A, id 2 tag B

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

2013-04-18 Thread Eric Blake
es, I think libvirt will be able to drive the new command by knowing how many heads appear per device, then passing in the appropriate named device to the QMP command. And yes, I'll review patch 5 regarding interface design. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virt

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

2013-04-18 Thread Eric Blake
>file) { >> +bdrv_snapshot_delete(bs->file, snapshot_id, errp); >> +} else { >> + error_setg(errp, "snapshots are not supported on device '%s'", >> + bdrv_get_device_name(bs)); > > Same thing with the device name here. Same thing about this function being reached via vm-snapshot-delete where we aren't passing in a device name, so knowing which device failed is important. -- 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-18 Thread Eric Blake
e new command, if not, it gives the user a nice error unless screen 0 was selected. Option 2 is probably slightly nicer for guaranteeing a sane error message back to the user, but option 1 (the approach of this series) still seems 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] virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event

2013-04-18 Thread Eric Blake
l incorretly be: > >{ "timestamp": { "seconds": 1366228965, "microseconds": 245466 }, > "event": "BALLOON_CHANGE", "data": { "actual": 5368709120 } } > > To fix it this commit casts it to ram_addr_t, which is ram_siz

Re: [Qemu-devel] [PATCH] ssh: Remove unnecessary use of strlen function.

2013-04-18 Thread Eric Blake
On 04/18/2013 03:09 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > --- > block/ssh.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization l

Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration

2013-04-18 Thread Eric Blake
on demand' or 'all at once', just that I'm supposed to read rdma.txt to decide if I want to move away from the default. /me reads patch 11 again... and wonders why the docs came last instead of first in the series... I guess the opposite sense could be named 'x-rdm

Re: [Qemu-devel] [PULL v4 08/11] rdma: core logic

2013-04-18 Thread Eric Blake
#x27; minds during the rest of the series to validate that the implementation matches docs. On later review (such as git bisect landing here), it means the docs are in-tree for any other commit that references them. If it were me, I'd rebase things to put docs in patch 1 on the v5 ser

Re: [Qemu-devel] [PATCH v2 13/23] qapi: Add a primitive to include other files from a QAPI schema file

2013-04-18 Thread Eric Blake
On 04/16/2013 07:51 AM, LluĂ­s Vilanova wrote: > Adds the "input(...)" primitive to the syntax of QAPI schema files. Interesting idea, but isn't "include(...)" a more common name than "input(...)"? -- Eric Blake eblake redhat com+1-919-301-32

Re: [Qemu-devel] [PATCH v2 15/23] instrument: [qmp, qapi] Add control interface

2013-04-18 Thread Eric Blake
> + > +input("instrument/qapi-schema.json") See my comments on 13/23 about possibly naming this include() instead of input(). > +Example: > + > +-> { "execute": "instr-load", "arguments": { "path": > "/tmp/libtrace-instr

Re: [Qemu-devel] [PATCH v2 17/23] instrument: Add commandline options to start with an instrumentation library

2013-04-18 Thread Eric Blake
ot;instr", "QEMU_INSTR", true, handle_arg_instrument, > + "path", "load a dynamic trace instrumentation library"}, > +#endif > +#if defined(CONFIG_TRACE_INSTRUMENT) > +{"instr-arg", "QEMU_INSTR_ARGS", true, handle_a

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