Re: [Qemu-devel] [PATCH] give some useful error messages when tap open

2010-06-02 Thread Luiz Capitulino
On Wed, 02 Jun 2010 20:26:58 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: From: Michael Tokarev m...@tls.msk.ru In net/tap-linux.c, when manipulation of /dev/net/tun fails, it prints (with fprintf) something like this: warning

[Qemu-devel] [Bug 573827] Re: QEMU 0.12.3 crashes on incomplete USB serial device parameter

2010-06-02 Thread Luiz Capitulino
Bug exists in latest stable (0.12.4) but it's fixed in current master, I'll backport the commits. ** Changed in: qemu Status: New = In Progress -- QEMU 0.12.3 crashes on incomplete USB serial device parameter https://bugs.launchpad.net/bugs/573827 You received this bug notification

[Qemu-devel] [STABLE 0/3] Fix -usbdevice crash

2010-06-02 Thread Luiz Capitulino
This series fixes bug 573827, which is a segfault when you do: $ qemu -usbdevice serial All commits backported from current master, just minimally tested.

[Qemu-devel] [STABLE 2/3] Avoid crash on '-usbdevice device' without parameters

2010-06-02 Thread Luiz Capitulino
From: Jan Kiszka jan.kis...@web.de Many usbdevice_init implementors assume params is non-NULL. Signed-off-by: Jan Kiszka jan.kis...@web.de Signed-off-by: Anthony Liguori aligu...@us.ibm.com (cherry picked from commit 702f3e0fb52c124c07f215426eeadb70a716643f) --- hw/usb-bus.c |4 +++- 1

[Qemu-devel] [STABLE 1/3] Fix -usbdevice crash

2010-06-02 Thread Luiz Capitulino
From: Paul Brook p...@codesourcery.com If -usbdevice is used on a machine with no USB busses, usb_create will fail and return NULL. Patch below handles this failure gracefully rather than crashing when we try to init the device. Signed-off-by: Paul Brook p...@codesourcery.com (cherry picked

[Qemu-devel] [STABLE 3/3] usb-bus: fix no params

2010-06-02 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com (cherry picked from commit 98f22dc172e1ebd5341da3de0d67666442566f72) --- hw/usb-bus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-bus.c b/hw/usb-bus.c index 3bb8986..aae1fef 100644 --- a/hw/usb-bus.c +++ b/hw/usb

[Qemu-devel] [Bug 584143] Re: qemu fails to set hdd serial number

2010-06-02 Thread Luiz Capitulino
Bug exists in both current master and stable v0.12.4, but the suggested fix doesn't leave room for the null terminating byte, will submit upstream a better version. ** Changed in: qemu Status: New = In Progress -- qemu fails to set hdd serial number https://bugs.launchpad.net/bugs/584143

[Qemu-devel] [PATCH] block: Fix serial number assignment

2010-06-02 Thread Luiz Capitulino
We should use 'dinfo-serial' length, 'serial' is a pointer, so the serial number length is currently limited to the pointer size. This fixes https://bugs.launchpad.net/qemu/+bug/584143 and is also valid for stable. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- vl.c |2 +- 1

[Qemu-devel] [Bug 589315] Re: qemu: Improve error reporting when migration can't connect

2010-06-04 Thread Luiz Capitulino
** Changed in: qemu Status: New = Confirmed -- qemu: Improve error reporting when migration can't connect https://bugs.launchpad.net/bugs/589315 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: Confirmed Bug

Re: [Qemu-devel] [PATCH] hxtool: Fix line number reporting on SQMP/EQMP errors

2010-06-04 Thread Luiz Capitulino
On Wed, 02 Jun 2010 09:06:03 +0200 Jan Kiszka jan.kis...@web.de wrote: From: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com Looks good. --- hxtool |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hxtool b/hxtool index

Re: [Qemu-devel] [PATCH] monitor: allow device to be ejected if no disk is inserted

2010-06-04 Thread Luiz Capitulino
On Tue, 1 Jun 2010 19:12:19 -0300 Eduardo Habkost ehabk...@redhat.com wrote: I have no clue why the code had the is_inserted() check, as it doesn't matter if there is a disk present at the host drive, when the user wants the virtual device to be disconnected from the host device. Makes

Re: [Qemu-devel] [PATCH] Change 'query-version' to output broken down version string

2010-06-04 Thread Luiz Capitulino
On Wed, 2 Jun 2010 13:40:06 +0100 Daniel P. Berrange berra...@redhat.com wrote: A previous discussion brought up the fact that clients should not have to parse version string from QMP, it should be given to them pre-split. Right. Change query-version output format from: { qemu:

Re: [Qemu-devel] Few Questions about QEMU JSON

2010-06-08 Thread Luiz Capitulino
On Mon, 7 Jun 2010 10:20:47 +0530 (IST) akshay st aksha...@yahoo.co.in wrote: Hello, Basically i want to seperate QEMU(Instruction translations, hardware emulation drivers etc...) and Simulators (UI,events etc...), Someone suggested me to use json mechanism. I want to understand more on

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-08 Thread Luiz Capitulino
On Tue, 08 Jun 2010 11:01:19 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/08/2010 10:05 AM, Chris Wright wrote: [...] migration events? - QMP (wire protocol) has nice async events - QError reasonable - migration is async command, can complete w/ error or success -

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Luiz Capitulino
On Tue, 08 Jun 2010 16:13:37 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/08/2010 03:59 PM, Luiz Capitulino wrote: Now, QError. This is something I think we should fix for 0.13. However, I still don't know how to get it right: most of what you say in the wiki page has

Re: [Qemu-devel] [PATCH 01/19] Add support for JSON pretty printing

2010-06-09 Thread Luiz Capitulino
On Mon, 7 Jun 2010 15:42:14 +0100 Daniel P. Berrange berra...@redhat.com wrote: The monitor does not pretty-print JSON output, so that everything will be on a single line reply. When JSON docs get large this is quite unpleasant to read. For the future command line capabilities query ability,

Re: [Qemu-devel] [PATCH 03/19] Add enum handlers for easy efficient string - int conversion

2010-06-09 Thread Luiz Capitulino
On Mon, 7 Jun 2010 15:42:16 +0100 Daniel P. Berrange berra...@redhat.com wrote: There is quite alot of code using an enumeration of possible values, which also needs todo conversions to/from a string representation of enum values. These string - int conversions have been repeated in an adhoc

Re: [Qemu-devel] [PATCH 06/19] Convert drive options to use enumeration data type

2010-06-09 Thread Luiz Capitulino
On Mon, 7 Jun 2010 15:42:19 +0100 Daniel P. Berrange berra...@redhat.com wrote: This converts the drive options if, trans, media, cache, aio, rerror and werror to use the QEMU_OPT_ENUM datatype. This standardizes the string parsing and error reporting $ qemu -drive file=foo,werror=stop3

Re: [Qemu-devel] [PATCH 08/19] Convert RTC to use enumerations for configuration parameters

2010-06-09 Thread Luiz Capitulino
On Mon, 7 Jun 2010 15:42:21 +0100 Daniel P. Berrange berra...@redhat.com wrote: Convert the rtc clock and driftfix parameters to use enums for configuration. This ensures strict validation at time of config parsing. Also fixes a bug in qemu-config.c where 'driftfix' was never enabled

Re: [Qemu-devel] [PATCH 09/19] Change 'query-version' to output broken down version string

2010-06-09 Thread Luiz Capitulino
On Mon, 07 Jun 2010 10:11:28 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/07/2010 09:42 AM, Daniel P. Berrange wrote: A previous discussion brought up the fact that clients should not have to parse version string from QMP, it should be given to them pre-split. Change

Re: [Qemu-devel] [PATCH 00/19] RFC: Reporting QEMU binary capabilities

2010-06-09 Thread Luiz Capitulino
On Mon, 07 Jun 2010 11:07:14 -0500 Anthony Liguori anth...@codemonkey.ws wrote: Hi Daniel, On 06/07/2010 09:42 AM, Daniel P. Berrange wrote: As everyone here agrees, having management apps parse -help output to determine the QEMU capabilities is not at all nice, because it is an

Re: [Qemu-devel] [PATCH 1/3] export tdb_hash()

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:31:38 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This exports tdb_hash() for use by tracing framework. Suggest to rename it (eg. qemu_hash()) and move it to a better location, qdict is not the best module to export such service. Signed-off-by: Prerna Saxena

Re: [Qemu-devel] [PATCH 2/3] Monitor command 'trace'

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:34:37 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This introduces the monitor command 'trace' to read current contents of trace buffer. Signed-off-by: Prerna Saxena pre...@linux.vnet.ibm.com --- configure |3 +++ monitor.c |3 +++

Re: [Qemu-devel] [PATCH 3/3] Toggle tracepoint state

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:38:58 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This patch adds support for dynamically enabling/disabling of tracepoints. Monitor commands added : 1) info tracepoints : to view all available tracepoints and their

Re: [Qemu-devel] [PATCH v3 0/5] Add QMP migration events

2010-06-09 Thread Luiz Capitulino
On Wed, 9 Jun 2010 14:10:53 +0200 Juan Quintela quint...@redhat.com wrote: This is a resent with what we agreed on yesterday call. Migration events would be there for 0.13 until we get proper async command support. Something which is not clear to me is the set of events we'd have if migrate

Re: [Qemu-devel] [PATCH v3 3/5] QMP: Introduce MIGRATION events

2010-06-09 Thread Luiz Capitulino
On Wed, 9 Jun 2010 14:10:56 +0200 Juan Quintela quint...@redhat.com wrote: They are emitted when migration starts, ends, has a failure or is canceled. Signed-off-by: Juan Quintela quint...@redhat.com --- QMP/qmp-events.txt | 52

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-11 Thread Luiz Capitulino
On Thu, 10 Jun 2010 09:27:34 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/10/2010 08:08 AM, Kevin Wolf wrote: Am 10.06.2010 14:53, schrieb Anthony Liguori: On 06/10/2010 04:43 AM, Kevin Wolf wrote: Huh, why this? Seems I still haven't understood all of qcow2

[Qemu-devel] Re: [PATCH v3 3/5] QMP: Introduce MIGRATION events

2010-06-11 Thread Luiz Capitulino
On Thu, 10 Jun 2010 12:33:42 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Wed, 9 Jun 2010 14:10:56 +0200 Juan Quintela quint...@redhat.com wrote: +MIGRATION_FAILED + + +Emitted when migration fails (both is source

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-11 Thread Luiz Capitulino
On Thu, 10 Jun 2010 12:44:55 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Wed, 9 Jun 2010 14:10:53 +0200 Juan Quintela quint...@redhat.com wrote: This is a resent with what we agreed on yesterday call. Migration events would

Re: [Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-11 Thread Luiz Capitulino
On Fri, 11 Jun 2010 09:38:42 -0500 Anthony Liguori anth...@codemonkey.ws wrote: 1. QMP only returns the response when the command is finished, eg: C: { execute: migrate, id: foo ... } /* nothing is returned, other commands are issued, after several hours... */ S: {

[Qemu-devel] Re: [RFC v2] [PATCH 1/3] Export tdb_hash()

2010-06-11 Thread Luiz Capitulino
On Fri, 11 Jun 2010 00:45:58 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: For now, I simply export tdb_hash() from qdict.h for use by tracing framework. Luiz suggested renaming and exporting it from a location other than qdict.h . Would qemu-common.h be a better place?

Re: [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend

2010-06-11 Thread Luiz Capitulino
On Fri, 11 Jun 2010 14:08:56 +0200 Jan Kiszka jan.kis...@siemens.com wrote: Markus Armbruster wrote: Prerna Saxena pre...@linux.vnet.ibm.com writes: This is v2 of monitor commands based on Stefan's trace framework : ( http://lists.gnu.org/archive/html/qemu-devel/2010-05/msg02407.html )

[Qemu-devel] [PATCH 00/10][PULL]: QMP/Monitor queue

2010-06-11 Thread Luiz Capitulino
Kiszka (1): hxtool: Fix line number reporting on SQMP/EQMP errors Luiz Capitulino (6): json-lexer: Initialize 'x' and 'y' json-lexer: Handle missing escapes qjson: Handle \f check-qjson: Add more escape tests json-lexer: Drop 'buf' json-streamer: Don't use

[Qemu-devel] [PATCH 02/10] json-lexer: Handle missing escapes

2010-06-11 Thread Luiz Capitulino
The JSON escape sequence \/ and \\ are valid and should be handled. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-lexer.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index 0b145d1..5cc7e6c 100644 --- a/json-lexer.c

[Qemu-devel] [PATCH 01/10] json-lexer: Initialize 'x' and 'y'

2010-06-11 Thread Luiz Capitulino
The 'lexer' variable is passed by the caller, it can contain anything (eg. garbage). Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-lexer.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index 9d64920..0b145d1 100644

[Qemu-devel] [PATCH 07/10] add some tests for invalid JSON

2010-06-11 Thread Luiz Capitulino
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qjson.c | 98 - 1 files changed, 97 insertions(+), 1 deletions(-) diff --git a/check

[Qemu-devel] [PATCH 04/10] check-qjson: Add more escape tests

2010-06-11 Thread Luiz Capitulino
While there make the fail_unless() calls print error messages. IMPORTANT: The test for \/ is failing, don't know why. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qjson.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/check-qjson.c b

[Qemu-devel] [PATCH 03/10] qjson: Handle \f

2010-06-11 Thread Luiz Capitulino
It's valid JSON and should be handled. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-parser.c |4 qjson.c |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/json-parser.c b/json-parser.c index b55d763..83212bc 100644 --- a/json-parser.c

[Qemu-devel] [PATCH 05/10] json-lexer: Drop 'buf'

2010-06-11 Thread Luiz Capitulino
QString supports adding a single char, 'buf' is unneeded. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-lexer.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index 5cc7e6c..1d9b81f 100644 --- a/json-lexer.c +++ b/json

[Qemu-devel] [PATCH 08/10] implement optional lookahead in json lexer

2010-06-11 Thread Luiz Capitulino
From: Paolo Bonzini pbonz...@redhat.com Not requiring one extra character when lookahead is not necessary ensures that clients behave properly even if they, for example, send QMP requests without a trailing newline. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Luiz Capitulino

[Qemu-devel] [PATCH 06/10] json-streamer: Don't use qdict_put_obj()

2010-06-11 Thread Luiz Capitulino
It's not needed, use qobject_put() instead and get a cleaner code. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-streamer.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/json-streamer.c b/json-streamer.c index 610ffea..f7e7a68 100644 --- a/json

[Qemu-devel] [PATCH 09/10] remove unnecessary lookaheads

2010-06-11 Thread Luiz Capitulino
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- json-lexer.c | 48 1 files changed, 16 insertions(+), 32 deletions(-) diff --git a/json-lexer.c b

[Qemu-devel] [PATCH 10/10] hxtool: Fix line number reporting on SQMP/EQMP errors

2010-06-11 Thread Luiz Capitulino
From: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- hxtool |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hxtool b/hxtool index d499dc0..7ca83ed 100644 --- a/hxtool +++ b

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-14 Thread Luiz Capitulino
On Mon, 14 Jun 2010 08:58:19 -0500 Anthony Liguori aligu...@linux.vnet.ibm.com wrote: For 0.13, we need to focus on introducing the least disruptive change that addresses the fundamental requirement--allow clients to avoid a polling loop for determining when migration ends. Having a single

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-14 Thread Luiz Capitulino
On Sat, 12 Jun 2010 13:20:54 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 11 Jun 2010 09:38:42 -0500 Anthony Liguori anth...@codemonkey.ws wrote: 1. QMP only returns the response when the command is finished, eg: C

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-15 Thread Luiz Capitulino
On Tue, 15 Jun 2010 12:30:57 +0200 Juan Quintela quint...@redhat.com wrote: Anthony Liguori anth...@codemonkey.ws wrote: On 06/14/2010 02:54 PM, Juan Quintela wrote: Anthony Liguorialigu...@linux.vnet.ibm.com wrote: What makes migration important and not savevm? That is the

[Qemu-devel] Re: [PATCH 2/8] QMP: Introduce the documentation for query-netdev and info netdev

2010-06-16 Thread Luiz Capitulino
On Thu, 10 Jun 2010 18:36:59 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: These commands show the information about active backend network devices. Signed-off-by: Miguel Di Ciurcio Filho miguel.fi...@gmail.com --- qemu-monitor.hx | 53

[Qemu-devel] Re: [PATCH 4/8] net: tap/tap-win32: introduce info_dict

2010-06-16 Thread Luiz Capitulino
On Thu, 10 Jun 2010 18:37:01 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: Signed-off-by: Miguel Di Ciurcio Filho miguel.fi...@gmail.com --- net/tap-win32.c |6 ++ net/tap.c | 20 2 files changed, 26 insertions(+), 0 deletions(-) diff

[Qemu-devel] Re: [PATCH 3/8] net: Introduce VLANClientState-info_dict

2010-06-16 Thread Luiz Capitulino
On Thu, 10 Jun 2010 18:37:00 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: There is no standard format when formatting VLANClientState.info_str, so it is difficult to extract information and transmit it over QMP. This patch adds info_dict, a QDict to better handle this

[Qemu-devel] Re: [PATCH 0/8] QMP: Introduce query-netdev

2010-06-16 Thread Luiz Capitulino
On Thu, 10 Jun 2010 18:36:57 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: This series introduces the protocol specification for querying the backend network devices and a monitor command to show the same information. Please, add changelog info next time so that it's easier to

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-16 Thread Luiz Capitulino
On Tue, 15 Jun 2010 17:24:59 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 15 Jun 2010 12:30:57 +0200 Juan Quintela quint...@redhat.com wrote: Anthony Liguori anth...@codemonkey.ws wrote: On 06/14/2010 02:54 PM, Juan Quintela

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-17 Thread Luiz Capitulino
On Wed, 16 Jun 2010 21:10:04 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 15 Jun 2010 17:24:59 +0200 Juan Quintela quint...@redhat.com wrote: I still don't see the need for MIGRATION_STARTED, it could be useful in the target

[Qemu-devel] Re: [PATCH v2] monitor: Really show snapshot information about all devices

2010-06-17 Thread Luiz Capitulino
On Thu, 17 Jun 2010 09:58:37 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: The 'info snapshots' monitor command does not show snapshot information from all available block devices. Usage example: $ qemu -hda disk1.qcow2 -hdb disk2.qcow2 (qemu) info snapshots Snapshot

[Qemu-devel] Re: [CFR 0/10] QMP specification review

2010-06-17 Thread Luiz Capitulino
On Tue, 15 Jun 2010 11:30:20 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This is the first set of commands as part of the QMP specification review. Please comment on the individual commands specifications and Stefan and I will try to fold the comments back into the command documentation.

[Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events

2010-06-17 Thread Luiz Capitulino
On Thu, 17 Jun 2010 18:34:00 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Wed, 16 Jun 2010 21:10:04 +0200 Juan Quintela quint...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 15 Jun 2010 17:24:59 +0200

Re: [Qemu-devel] [PATCH] monitor: Add force option support to pci_del command

2010-06-17 Thread Luiz Capitulino
On Tue, 15 Jun 2010 11:03:13 +0200 Markus Armbruster arm...@redhat.com wrote: Anthony Liguori anth...@codemonkey.ws writes: On 06/09/2010 09:27 AM, Gerd Hoffmann wrote: Hi, This make sense when you mistakenly add a pci device on a -s -S scenario, like the scenario described on the

Re: [Qemu-devel] Virtualization at Plumbers 2010 - Time to submit your proposals!

2010-06-18 Thread Luiz Capitulino
On Fri, 18 Jun 2010 14:00:36 +0200 Jes Sorensen jes.soren...@redhat.com wrote: - QMP and Spice I think we're going to discuss most QMP related subjects in the KVM forum, but I'm open to suggestions.

Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev

2010-06-18 Thread Luiz Capitulino
On Fri, 18 Jun 2010 15:28:42 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/18/2010 11:26 AM, Miguel Di Ciurcio Filho wrote: These commands show the information about active backend network devices. Signed-off-by: Miguel Di Ciurcio Filhomiguel.fi...@gmail.com ---

[Qemu-devel] Handling the O-type

2010-06-18 Thread Luiz Capitulino
On Wed, 02 Jun 2010 09:31:24 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: [...] static void check_mandatory_args(const char *cmd_arg_name, @@ -4344,6 +4413,9 @@ out: * Client argument checking rules: * * 1. Client must provide

Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev

2010-06-21 Thread Luiz Capitulino
On Mon, 21 Jun 2010 10:27:11 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: On Fri, 18 Jun 2010 15:28:42 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/18/2010 11:26 AM, Miguel Di Ciurcio Filho wrote: These commands show

[Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev

2010-06-21 Thread Luiz Capitulino
On Fri, 18 Jun 2010 13:26:27 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: These commands show the information about active backend network devices. Signed-off-by: Miguel Di Ciurcio Filho miguel.fi...@gmail.com --- qemu-monitor.hx | 105

Re: [Qemu-devel] Handling the O-type

2010-06-21 Thread Luiz Capitulino
On Mon, 21 Jun 2010 10:12:06 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 02 Jun 2010 09:31:24 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: [...] static void

[Qemu-devel] Re: [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev

2010-06-22 Thread Luiz Capitulino
On Mon, 21 Jun 2010 17:31:28 -0300 Miguel Di Ciurcio Filho miguel.fi...@gmail.com wrote: These commands show the information about active backend network devices. Changes from v2 --- - Got rid of vlans, a separate command for them will be created if needed - Removed socket as a

[Qemu-devel] [PATCH 03/13] QDict: Introduce functions to retrieve QDictEntry values

2010-06-22 Thread Luiz Capitulino
Next commit will introduce a new QDict iteration API which returns QDictEntry entries, but we don't want users to directly access its members since QDictEntry should be private to QDict. In the near future this kind of data type will be turned into a forward reference. Signed-off-by: Luiz

[Qemu-devel] [PATCH v2 00/13]: QMP: Replace client argument checker

2010-06-22 Thread Luiz Capitulino
Current QMP's client argument checker code is more complex than it should be and has a flaw: it ignores unknown arguments. This series solves both problems by introducing a new, simple and ultra-poweful argument checker. This wasn't trivial to get right due to the number of errors combinations,

[Qemu-devel] [PATCH 01/13] QDict: Rename 'err_value'

2010-06-22 Thread Luiz Capitulino
A missing key is not an error. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c |6 +++--- qdict.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qdict.c b/qdict.c index 175bc17..c974d6f 100644 --- a/qdict.c +++ b/qdict.c @@ -272,16 +272,16

[Qemu-devel] [PATCH 12/13] QMP: Introduce qmp_check_input_obj()

2010-06-22 Thread Luiz Capitulino
to the specification. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 45 + 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 2a29095..a24a152 100644 --- a/monitor.c +++ b/monitor.c @@ -4163,6

[Qemu-devel] [PATCH 05/13] check-qdict: Introduce test for the new iteration API

2010-06-22 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qdict.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/check-qdict.c b/check-qdict.c index 1b070f4..6afce5a 100644 --- a/check-qdict.c +++ b/check-qdict.c @@ -194,6 +194,36

[Qemu-devel] [PATCH 02/13] QDict: Small terminology change

2010-06-22 Thread Luiz Capitulino
Let's call a 'hash' only what is returned by our hash function, anything else is a 'bucket'. This helps avoiding confusion with regard to how we traverse our table. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qdict.c |2 +- qdict.c | 24

[Qemu-devel] [PATCH 11/13] QError: Introduce QERR_QMP_UNEXPECTED_INPUT_OBJECT_MEMBER

2010-06-22 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 44d0bf8..8a10557 100644 --- a/qerror.c +++ b/qerror.c @@ -177,6 +177,10 @@ static const QErrorStringTable

[Qemu-devel] [PATCH 04/13] QDict: Introduce new iteration API

2010-06-22 Thread Luiz Capitulino
hopefully better than any English description): QDict *qdict; const QDictEntry *ent; [...] for (ent = qdict_first(qdict); ent; ent = qdict_next(qdict, ent)) { printf(%s , qdict_entry_key(ent)); } Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c | 37

[Qemu-devel] [PATCH 10/13] QMP: Drop old client argument checker

2010-06-22 Thread Luiz Capitulino
Previous two commits added qmp_check_client_args(), which fully replaces this code and is way better. It's important to note that the new checker doesn't support the '/' arg type. As we don't have any of those handlers converted to QMP, this is just dead code. Signed-off-by: Luiz Capitulino

[Qemu-devel] [PATCH 09/13] QMP: New argument checker (second part)

2010-06-22 Thread Luiz Capitulino
'/' and '.' are currently unsupported under QMP, thus they're not handled Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 100 - 1 files changed, 99 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c

[Qemu-devel] [PATCH 08/13] QMP: New argument checker (first part)

2010-06-22 Thread Luiz Capitulino
and iterate over it. Next commit adds the new checker's second part: type checking and invalid argument detection. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 106 + 1 files changed, 106 insertions(+), 0 deletions

[Qemu-devel] [PATCH 07/13] Monitor: handle optional '-' arg as a bool

2010-06-22 Thread Luiz Capitulino
default behavior Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- blockdev.c |2 +- migration.c | 16 +++- monitor.c | 17 +++-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/blockdev.c b/blockdev.c index b376884..5844eac

[Qemu-devel] [PATCH 06/13] QDict: Introduce qdict_get_try_bool()

2010-06-22 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c | 18 ++ qdict.h |1 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/qdict.c b/qdict.c index a28a0a9..dee0fb4 100644 --- a/qdict.c +++ b/qdict.c @@ -308,6 +308,24 @@ int64_t qdict_get_try_int

[Qemu-devel] [PATCH 13/13] QMP: Drop old input object checking

2010-06-22 Thread Luiz Capitulino
Previous commit added qmp_check_input_obj(), it does all the checking we need. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index a24a152..c558cc7 100644 --- a/monitor.c

[Qemu-devel] [PATCH 2/2] QError: Enhance QERR_DEVICE_NOT_ACTIVE's user desc

2010-06-23 Thread Luiz Capitulino
The 'by the guest' part is misleading, it could be disabled by the host too. We will likely need more surgery if we care for the distinction, just dropping the problematic part is good enough for now. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qerror.c |2 +- 1 files changed

[Qemu-devel] [PATCH 0/2]: QMP/Monitor: Fix balloon error reporting

2010-06-23 Thread Luiz Capitulino
Details in the patches.

[Qemu-devel] [PATCH 1/2] QMP: Fix error reporting in the async API

2010-06-23 Thread Luiz Capitulino
will be sent to the client. This commit fixes the problem by making qmp_async_cmd_handler() return the handler's error code and then calling monitor_protocol_emitter() if the handler has returned an error. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 12 1 files

Re: [Qemu-devel] [PATCH 07/13] Monitor: handle optional '-' arg as a bool

2010-06-23 Thread Luiz Capitulino
On Wed, 23 Jun 2010 17:05:02 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: Historically, user monitor arguments beginning with '-' (eg. '-f') were passed as integers down to handlers. I've maintained this behavior in the new monitor

Re: [Qemu-devel] [PATCH 12/13] QMP: Introduce qmp_check_input_obj()

2010-06-23 Thread Luiz Capitulino
On Wed, 23 Jun 2010 17:23:54 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: This is similar to qmp_check_client_args(), but it checks if the input object follows the specification (QMP/qmp-spec.txt section 2.3). As we're limited

Re: [Qemu-devel] [PATCH 07/13] Monitor: handle optional '-' arg as a bool

2010-06-23 Thread Luiz Capitulino
On Wed, 23 Jun 2010 18:31:53 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 23 Jun 2010 17:05:02 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: Historically, user monitor

Re: [Qemu-devel] [PATCH 09/13] QMP: New argument checker (second part)

2010-06-23 Thread Luiz Capitulino
On Wed, 23 Jun 2010 17:21:12 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: This commit introduces the second (and last) part of QMP's new argument checker. The job is done by check_client_args_type(), it iterates over the client's

[Qemu-devel] [PATCH 01/14] QDict: Rename 'err_value'

2010-06-24 Thread Luiz Capitulino
A missing key is not an error. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c |6 +++--- qdict.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qdict.c b/qdict.c index 175bc17..c974d6f 100644 --- a/qdict.c +++ b/qdict.c @@ -272,16 +272,16

[Qemu-devel] [PATCH v3 00/14]: QMP: Replace client argument checker

2010-06-24 Thread Luiz Capitulino
Current QMP's client argument checker code is more complex than it should be and has a flaw: it ignores unknown arguments. This series solves both problems by introducing a new, simple and ultra-poweful argument checker. This wasn't trivial to get right due to the number of errors combinations,

[Qemu-devel] [PATCH 09/14] QMP: New argument checker (second part)

2010-06-24 Thread Luiz Capitulino
'/' and '.' are currently unsupported under QMP, thus they're not handled Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 94 - 1 files changed, 93 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c

[Qemu-devel] [PATCH 07/14] Monitor: handle optional '-' arg as a bool

2010-06-24 Thread Luiz Capitulino
default behavior Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- blockdev.c |2 +- migration.c | 16 +++- monitor.c | 17 +++-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/blockdev.c b/blockdev.c index 3b8c606..4dcfad8

[Qemu-devel] [PATCH 08/14] QMP: New argument checker (first part)

2010-06-24 Thread Luiz Capitulino
and iterate over it. Next commit adds the new checker's second part: type checking and invalid argument detection. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 106 + 1 files changed, 106 insertions(+), 0 deletions

[Qemu-devel] [PATCH 05/14] check-qdict: Introduce test for the new iteration API

2010-06-24 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qdict.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/check-qdict.c b/check-qdict.c index 1b070f4..6afce5a 100644 --- a/check-qdict.c +++ b/check-qdict.c @@ -194,6 +194,36

[Qemu-devel] [PATCH 02/14] QDict: Small terminology change

2010-06-24 Thread Luiz Capitulino
Let's call a 'hash' only what is returned by our hash function, anything else is a 'bucket'. This helps avoiding confusion with regard to how we traverse our table. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- check-qdict.c |2 +- qdict.c | 24

[Qemu-devel] [PATCH 10/14] QMP: Drop old client argument checker

2010-06-24 Thread Luiz Capitulino
Previous two commits added qmp_check_client_args(), which fully replaces this code and is way better. It's important to note that the new checker doesn't support the '/' arg type. As we don't have any of those handlers converted to QMP, this is just dead code. Signed-off-by: Luiz Capitulino

[Qemu-devel] [PATCH 04/14] QDict: Introduce new iteration API

2010-06-24 Thread Luiz Capitulino
hopefully better than any English description): QDict *qdict; const QDictEntry *ent; [...] for (ent = qdict_first(qdict); ent; ent = qdict_next(qdict, ent)) { printf(%s , qdict_entry_key(ent)); } Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c | 37

[Qemu-devel] [PATCH 03/14] QDict: Introduce functions to retrieve QDictEntry values

2010-06-24 Thread Luiz Capitulino
Next commit will introduce a new QDict iteration API which returns QDictEntry entries, but we don't want users to directly access its members since QDictEntry should be private to QDict. In the near future this kind of data type will be turned into a forward reference. Signed-off-by: Luiz

[Qemu-devel] [PATCH 13/14] QMP: Drop old input object checking

2010-06-24 Thread Luiz Capitulino
Previous commit added qmp_check_input_obj(), it does all the checking we need. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 19 +-- 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/monitor.c b/monitor.c index fab553a..b68b464 100644

[Qemu-devel] [PATCH 12/14] QMP: Introduce qmp_check_input_obj()

2010-06-24 Thread Luiz Capitulino
to the specification. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 62 - 1 files changed, 61 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 8d3e788..fab553a 100644 --- a/monitor.c +++ b/monitor.c

[Qemu-devel] [PATCH 14/14] QMP: handle_qmp_command(): Small cleanup

2010-06-24 Thread Luiz Capitulino
Drop a unneeded label and QDECREF() call. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- monitor.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/monitor.c b/monitor.c index b68b464..e38a3a4 100644 --- a/monitor.c +++ b/monitor.c @@ -4227,7

Re: [Qemu-devel] [PATCH v3 00/14]: QMP: Replace client argument checker

2010-06-24 Thread Luiz Capitulino
On Thu, 24 Jun 2010 18:33:26 -0300 Luiz Capitulino lcapitul...@redhat.com wrote: Current QMP's client argument checker code is more complex than it should be and has a flaw: it ignores unknown arguments. This series solves both problems by introducing a new, simple and ultra-poweful

[Qemu-devel] [PATCH 06/14] QDict: Introduce qdict_get_try_bool()

2010-06-24 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qdict.c | 18 ++ qdict.h |1 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/qdict.c b/qdict.c index a28a0a9..dee0fb4 100644 --- a/qdict.c +++ b/qdict.c @@ -308,6 +308,24 @@ int64_t qdict_get_try_int

[Qemu-devel] [PATCH 11/14] QError: Introduce QERR_QMP_EXTRA_MEMBER

2010-06-24 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index cce1e7b..2f6f590 100644 --- a/qerror.c +++ b/qerror.c @@ -177,6 +177,10 @@ static const QErrorStringTable

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