[Qemu-devel] [PULL 09/38] pci-assign: make assign_failed_examine() just format the cause

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek This allows us to report the entire error with one error_report() call, easing future error propagation. Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 30 +++--- 1 file changed, 19

[Qemu-devel] [PULL 10/38] pci-assign: propagate errors from get_real_id()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek get_real_id() has two thin wrappers (and no other callers), get_real_vendor_id() and get_real_device_id(); it's easiest to convert them in one fell swoop. Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c

[Qemu-devel] [PULL 07/38] monitor: add Error-propagating monitor_handle_fd_param2()

2014-05-08 Thread Luiz Capitulino
(if any)). Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- include/monitor/monitor.h | 1 + monitor.c | 27 ++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/monitor/monitor.h b/include

[Qemu-devel] [PULL 06/38] cutils: tighten qemu_parse_fd()

2014-05-08 Thread Luiz Capitulino
off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- util/cutils.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/util/cutils.c b/util/cutils.c index b337293..dbe7412 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -24,6 +24,8 @@ #in

[Qemu-devel] [PULL 18/38] pci-assign: propagate errors from assigned_dev_register_regions()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index 3a904e8

[Qemu-devel] [PULL 15/38] pci-assign: propagate errors from get_real_device()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci

[Qemu-devel] [PULL 14/38] pci-assign: assignment should fail if we can't read config space

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek assigned_initfn() get_real_device() read() Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index

[Qemu-devel] [PULL 21/38] pci-assign: assigned_initfn(): set monitor error in common error handler

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index

[Qemu-devel] [PULL 05/38] qapi: treat all negative return of strtosz_suffix() as error

2014-05-08 Thread Luiz Capitulino
Kong Reviewed-by: Michael S. Tsirkin Signed-off-by: Luiz Capitulino --- qapi/opts-visitor.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 5d830a2..87c1c78 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c

[Qemu-devel] [PULL 31/38] qga: Clean up fragile use of error_is_set()

2014-05-08 Thread Luiz Capitulino
more obviously correct: receive the error in a local variable, then propagate it through the parameter. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino --- qga/commands-posix.c | 22 -- qga/comman

[Qemu-devel] [PULL 33/38] qemu-option: Clean up fragile use of error_is_set()

2014-05-08 Thread Luiz Capitulino
t;errp directly. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- util/qemu-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 8bbc3ad..324e4c5 100644 --- a/util/qemu-option.c

[Qemu-devel] [PULL 29/38] tests/qapi-schema: Drop superfluous error_is_set()

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino ---

[Qemu-devel] [PULL 16/38] pci-assign: propagate errors from assigned_device_pci_cap_init()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 45 +++-- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci

[Qemu-devel] [PULL 20/38] pci-assign: propagate errors from assign_intx()

2014-05-08 Thread Luiz Capitulino
ned-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index 0fedca8..6891729 10064

[Qemu-devel] [PULL 32/38] qga: Drop superfluous error_is_set()

2014-05-08 Thread Luiz Capitulino
Roth Signed-off-by: Luiz Capitulino --- qga/commands-win32.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 3483c0d..d793dd0 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -35,10 +35,6 @@ static void acquire_privilege(

[Qemu-devel] [PULL 17/38] pci-assign: propagate errors from assigned_dev_register_msix_mmio()

2014-05-08 Thread Luiz Capitulino
a common -EFAULT). Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index 2de6559..3a904e8 100644

[Qemu-devel] [PULL 22/38] qmp hmp: Consistently name Error * objects err, and not errp

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/writing-qmp-commands.txt | 28 hmp.c | 138 ++--- include/qapi/qmp/dispatch.h| 2

[Qemu-devel] [PULL 24/38] qmp: Consistently name Error ** objects errp, and not err

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qmp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qmp.c b/qmp.c index 233325d..82acb89 100644 --- a/qmp.c +++ b/qmp.c @@ -41,7 +41,7

[Qemu-devel] [PULL 27/38] hmp: Guard against misuse of hmp_handle_error()

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster Null errp argument makes no sense. Assert it's not null, to make this explicit, and guard against misuse. All current callers pass non-null errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hmp.c | 3 ++- 1

[Qemu-devel] [PULL 26/38] qga: Use return values instead of error_is_set(errp)

2014-05-08 Thread Luiz Capitulino
s far as I can tell, errp can't be null there, but this is more robust and more obviously correct. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino --- qga/commands-posix.c | 6 +++--- qga/main.c | 1 + 2 files change

[Qemu-devel] [PULL 28/38] qapi: Drop redundant, unclean error_is_set()

2014-05-08 Thread Luiz Capitulino
not locally obvious. Unclean. Cleanup would be easy enough, but since the unclean code is also redundant, let's just drop it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino --- qapi/qmp-dispatch.c | 3 +-- 1 file c

[Qemu-devel] [PULL 30/38] qapi: Clean up fragile use of error_is_set()

2014-05-08 Thread Luiz Capitulino
h the parameter. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Signed-off-by: Luiz Capitulino --- qapi/qmp-dispatch.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 187af56.

[Qemu-devel] [PULL 34/38] dump: Drop pointless error_is_set(), DumpState member errp

2014-05-08 Thread Luiz Capitulino
Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- dump.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dump.c b/dump.c index 14b3d1d..e56b7cf 100644 --- a/dump.c +++ b/dump.c @@ -86,7 +86,6 @@ typedef struct DumpState { bool has_filter

[Qemu-devel] [PULL 36/38] qmp: use valid JSON in transaction example

2014-05-08 Thread Luiz Capitulino
From: Eric Blake Our example should use the correct quotes to match what someone could actually pass over the wire. * qmp-commands.hx: Use correct JSON quotes. Signed-off-by: Eric Blake Signed-off-by: Luiz Capitulino --- qmp-commands.hx | 8 1 file changed, 4 insertions(+), 4

[Qemu-devel] [PULL 13/38] pci-assign: accept Error from pci_add_capability2()

2014-05-08 Thread Luiz Capitulino
g and returning them). Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index b4

[Qemu-devel] [PULL 38/38] Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()"

2014-05-08 Thread Luiz Capitulino
ot;arguments": { "options" : { "driver": "invalid-driver" } } } CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qapi/qapi-dealloc-visitor.c | 4 +++- 1 file cha

[Qemu-devel] [PULL 23/38] qga: Consistently name Error ** objects errp, and not err

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qga/commands-posix.c | 199 ++- qga/commands-win32.c | 105 ++- qga/commands.c | 4 +- qga/vss

[Qemu-devel] [PULL 37/38] qapi: Document optional arguments' backwards compatibility

2014-05-08 Thread Luiz Capitulino
From: Eric Blake Signed-off-by: Eric Blake Signed-off-by: Fam Zheng Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 051d109

[Qemu-devel] [PULL 03/38] qapi: Use an explicit input file

2014-05-08 Thread Luiz Capitulino
From: Lluís Vilanova Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capit

[Qemu-devel] [PULL 25/38] error: Consistently name Error ** objects errp, and not err

2014-05-08 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- include/qapi/error.h | 27 --- util/error.c | 8 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/include/qapi/error.h

[Qemu-devel] [PULL 00/38] QMP queue

2014-05-08 Thread Luiz Capitulino
The following changes since commit 6b342cc9c872e82620fdd32730cd92affa8a19b3: Merge remote-tracking branch 'remotes/spice/tags/pull-spice-7' into staging (2014-05-08 10:57:25 +0100) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch ch

[Qemu-devel] [PULL 12/38] pci: add Error-propagating pci_add_capability2()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek ... and rebase pci_add_capability() to it. Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/pci/pci.c | 32 ++-- include/hw/pci/pci.h | 4 2 files changed, 30 insertions(+), 6 deletions

[Qemu-devel] [PULL 19/38] pci-assign: propagate errors from assign_device()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Also, change the return type to "void"; the function is static (with a sole caller) and the negative errno values are not distinguished from each other. Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-ass

[Qemu-devel] [PULL 11/38] pci-assign: propagate Error from check_irqchip_in_kernel()

2014-05-08 Thread Luiz Capitulino
From: Laszlo Ersek Rename check_irqchip_in_kernel() to verify_irqchip_in_kernel(), so that the name reflects our expectation better. Rather than returning a bool, make it do nothing or set an Error. Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw

[Qemu-devel] [PULL 08/38] pci-assign: accept Error from monitor_handle_fd_param2()

2014-05-08 Thread Luiz Capitulino
ng an error). Signed-off-by: Laszlo Ersek eviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/i386/kvm/pci-assign.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index a825871..bfce97f 100644 --- a/hw/i38

[Qemu-devel] [PULL 35/38] qmp: Don't use error_is_set() to suppress additional errors

2014-05-08 Thread Luiz Capitulino
s the error before the loop. Clean it up anyway: replace bdrv_iterate() by bdrv_next(), break the loop on error. Replace both occurrences, for consistency. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qmp.c | 32 +++- 1

[Qemu-devel] [PULL 02/38] qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

2014-05-08 Thread Luiz Capitulino
From: Lluís Vilanova Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- tests/qapi-schema/test-qapi.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py

[Qemu-devel] [PULL 04/38] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-08 Thread Luiz Capitulino
From: Lluís Vilanova The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino

Re: [Qemu-devel] [PULL 00/38] QMP queue

2014-05-09 Thread Luiz Capitulino
On Fri, 09 May 2014 14:54:45 +0200 Markus Armbruster wrote: > Peter Maydell writes: > > > On 8 May 2014 19:52, Luiz Capitulino wrote: > >> The following changes since commit > >> 6b342cc9c872e82620fdd32730cd92affa8a19b3: > >> > >> Merge remot

Re: [Qemu-devel] [PULL 00/38] QMP queue

2014-05-09 Thread Luiz Capitulino
On Fri, 9 May 2014 12:57:43 +0100 Peter Maydell wrote: > On 8 May 2014 19:52, Luiz Capitulino wrote: > > The following changes since commit 6b342cc9c872e82620fdd32730cd92affa8a19b3: > > > > Merge remote-tracking branch 'remotes/spice/tags/pull-spice-7' into &

Re: [Qemu-devel] [PULL 08/38] pci-assign: accept Error from monitor_handle_fd_param2()

2014-05-12 Thread Luiz Capitulino
On Fri, 09 May 2014 16:48:23 -0600 Eric Blake wrote: > On 05/08/2014 12:52 PM, Luiz Capitulino wrote: > > From: Laszlo Ersek > > > > Propagate any errors in monitor fd handling up to get_real_device(), and > > report them there. We'll continue the propagation

Re: [Qemu-devel] [PATCH 2/4] qapi: output visitor crashes qemu if it encounters a NULL value

2014-05-14 Thread Luiz Capitulino
er. > The patch is needed because otherwise the main function will fail > if no value is passed by the user to string parameters. > > Regarding Luiz's concern, it can be a follow-up as I am not aware of > any problem with that. My concern was that I wasn't sure

Re: [Qemu-devel] [PATCH v2 00/12] qapi: Purge error_is_set()

2014-05-15 Thread Luiz Capitulino
On Wed, 7 May 2014 09:53:42 +0200 Markus Armbruster wrote: > This is the sixth part, covering QAPI and its users. Luiz agreed to > take this through his tree. > > PATCH 01-08 are preparatory cleanups. > > PATCH 09-11 fix misuses of the visitor API in hand-written code. > Generated code uses t

Re: [Qemu-devel] [PATCH 0/6] Miscellaneous command completion patches

2014-05-15 Thread Luiz Capitulino
On Wed, 7 May 2014 23:41:26 +0100 Hani Benhabiles wrote: > Compared to v1: > * Dropped patch 02/07 for help completion conversion. > * Nothing else changed. 04,05 and 06 are R-b by Stefan. > > Hani Benhabiles (6): > monitor: Convert sendkey to use command_completion. > monitor: Add chardev-

Re: [Qemu-devel] [PATCH v4 0/3] qapi: fix coding style in generated code

2014-05-15 Thread Luiz Capitulino
On Thu, 8 May 2014 09:14:37 +0800 Amos Kong wrote: > Not a serious issue, but it's helpful if we can fix it. > > V2: split change of scripts/qapi-visit.py to a split patch, > eat space by using a special char as Markus suggested > V3: update commitlog, update special string, fix of adding >

Re: [Qemu-devel] [PATCH v3] qapi: skip redundant includes

2014-05-15 Thread Luiz Capitulino
On Wed, 14 May 2014 16:07:49 +0200 Benoît Canet wrote: > The purpose of this change is to help create a json file containing > common definitions; each bit of generated C code must be emitted > only one time. > > A second history global to all QAPISchema instances has been added > to detect when

Re: [Qemu-devel] [PATCH] qapi: Show qapi-commands.py invocation in qapi-code-gen.txt

2014-05-15 Thread Luiz Capitulino
On Wed, 14 May 2014 17:27:23 +0200 Markus Armbruster wrote: > While there, pare down the shell prompts. > > Signed-off-by: Markus Armbruster > --- > Note: to be applied on top of "[PATCH v2 00/12] qapi: Purge > error_is_set()". Applied to the qmp branch, thanks. > > docs/qapi-code-gen.txt |

Re: [Qemu-devel] [PATCH 0/6] Miscellaneous command completion patches

2014-05-15 Thread Luiz Capitulino
On Thu, 15 May 2014 20:42:03 +0100 Hani Benhabiles wrote: > On Wed, May 07, 2014 at 11:41:26PM +0100, Hani Benhabiles wrote: > > Compared to v1: > > * Dropped patch 02/07 for help completion conversion. > > * Nothing else changed. 04,05 and 06 are R-b by Stefan. > > > > Hani Benhabiles (6): > >

Re: [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats

2014-05-16 Thread Luiz Capitulino
On Fri, 16 May 2014 00:11:24 -0600 Eric Blake wrote: > > Is "no stats yet" really an error? This is a special case where the guest hasn't ever filled QEMU with balloon stats. There are two possible cases. Either the guest hasn't done it yet, but will do in the future or the guest will never do

Re: [Qemu-devel] [PATCH v4 17/18] target-i386: block migration and savevm if invariant tsc is exposed

2014-05-16 Thread Luiz Capitulino
On Fri, 16 May 2014 11:05:28 +0200 Andreas Färber wrote: > Am 15.05.2014 22:22, schrieb Andreas Färber: > > Am 30.04.2014 18:48, schrieb Eduardo Habkost: > >> From: Marcelo Tosatti > >> > >> Invariant TSC documentation mentions that "invariant TSC will run at a > >> constant rate in all ACPI P-,

Re: [Qemu-devel] [PATCH v4 0/3] qapi: fix coding style in generated code

2014-05-16 Thread Luiz Capitulino
On Thu, 8 May 2014 09:14:37 +0800 Amos Kong wrote: > Not a serious issue, but it's helpful if we can fix it. > > V2: split change of scripts/qapi-visit.py to a split patch, > eat space by using a special char as Markus suggested > V3: update commitlog, update special string, fix of adding >

Re: [Qemu-devel] [PATCH v4] Let the C generated bits of QAPI be generated only once when identical includes are done

2014-05-16 Thread Luiz Capitulino
On Fri, 16 May 2014 12:51:55 +0200 Benoît Canet wrote: > in v4: > Document the feature [Eric, Luiz] > > Benoît Canet (1): > qapi: skip redundant includes Applied to the qmp branch, thanks. > > docs/qapi-code-gen.txt| 2 +- > scripts/qapi.py

[Qemu-devel] [PULL 01/20] qapi: Update qapi-code-gen.txt example to match current code

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 146 ++--- 1 file changed, 90 insertions(+), 56 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs

[Qemu-devel] [PULL 13/20] qapi: Show qapi-commands.py invocation in qapi-code-gen.txt

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster While there, pare down the shell prompts. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/qapi

[Qemu-devel] [PULL 14/20] monitor: Convert sendkey to use command_completion.

2014-05-16 Thread Luiz Capitulino
From: Hani Benhabiles Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 32 +++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx

[Qemu-devel] [PULL 08/20] qapi: Un-inline visit of implicit struct

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster In preparation of error handling changes. Bonus: generates less duplicated code. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- scripts/qapi-visit.py | 48 ++-- 1 file changed

[Qemu-devel] [PULL 11/20] tests: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-16 Thread Luiz Capitulino
ed-by: Eric Blake Signed-off-by: Luiz Capitulino --- tests/test-qmp-input-strict.c | 18 +- tests/test-qmp-output-visitor.c| 18 +- tests/test-visitor-serialization.c | 18 +- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/

[Qemu-devel] [PULL 20/20] qapi: skip redundant includes

2014-05-16 Thread Luiz Capitulino
these includes. It does not act as a stack and the changes made to it by the __init__ function are propagated back to the caller so it's really a global state. Signed-off-by: Benoit Canet Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-ge

[Qemu-devel] [PULL 16/20] monitor: Add chardev-add backend argument completion.

2014-05-16 Thread Luiz Capitulino
From: Hani Benhabiles Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index ba88e2a..93fa534 100644

[Qemu-devel] [PULL 12/20] qapi: Replace uncommon use of the error API by the common one

2014-05-16 Thread Luiz Capitulino
7;t catch you setting an error more than once. Standardize on the "check separately" technique for now, because it's overwhelmingly prevalent. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 87 +

[Qemu-devel] [PULL 15/20] monitor: Add chardev-remove command completion.

2014-05-16 Thread Luiz Capitulino
From: Hani Benhabiles Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index b4b23c8..ba88e2a 100644

[Qemu-devel] [PULL 09/20] hmp: Call visit_end_struct() after visit_start_struct() succeeds

2014-05-16 Thread Luiz Capitulino
Blake Signed-off-by: Luiz Capitulino --- hmp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hmp.c b/hmp.c index 5c4d612..a9d0236 100644 --- a/hmp.c +++ b/hmp.c @@ -1388,6 +1388,7 @@ void hmp_netdev_del(Monitor *mon, const QDict *qdict) void hmp_object_add(Monitor

[Qemu-devel] [PULL 19/20] monitor: Add netdev_del id argument completion.

2014-05-16 Thread Luiz Capitulino
From: Hani Benhabiles Signed-off-by: Hani Benhabiles Reviewed-by: Stefan Hajnoczi Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 26 ++ 3 files changed, 28 insertions(+) diff --git a/hmp-commands.hx b/hmp

[Qemu-devel] [PULL 18/20] monitor: Add netdev_add type argument completion.

2014-05-16 Thread Luiz Capitulino
From: Hani Benhabiles Also update the command's documentation. Signed-off-by: Hani Benhabiles Reviewed-by: Stefan Hajnoczi Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 15 +++ 3 files changed, 18 insertions(+), 1 del

[Qemu-devel] [PULL 03/20] qapi: Remove unused Visitor callbacks start_handle(), end_handle()

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster These have never been called or implemented by anything, and their intended use is undocumented, like all of the visitor API. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- include/qapi/visitor-impl.h | 3 --- qapi/qapi

[Qemu-devel] [PULL 17/20] monitor: Add set_link arguments completion.

2014-05-16 Thread Luiz Capitulino
: Stefan Hajnoczi Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 34 ++ net/net.c | 2 +- 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 93fa534..3e7b29c

[Qemu-devel] [PULL 05/20] qapi-visit.py: Clean up confusing push_indent() / pop_indent() use

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster Changing implicit indentation in the middle of generating a block makes following the code being generated unnecessarily hard. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- scripts/qapi-visit.py | 32

[Qemu-devel] [PULL 06/20] qapi: Clean up shadowing of parameters and locals in inner scopes

2014-05-16 Thread Luiz Capitulino
From: Markus Armbruster By un-inlining the visit of nested complex types. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- scripts/qapi-visit.py | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/qapi

[Qemu-devel] [PULL 04/20] qapi: Replace start_optional()/end_optional() by optional()

2014-05-16 Thread Luiz Capitulino
ivial cleanup transformations without test cases doesn't strike me as a good idea. Drop end_optional(), and rename start_optional() to optional(). We can always go back to a pair of callbacks when we have an actual need. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-of

[Qemu-devel] [PULL 10/20] hw: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-16 Thread Luiz Capitulino
Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/timer/mc146818rtc.c | 23 +++ hw/virtio/virtio-balloon.c | 25 +++-- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818r

[Qemu-devel] [PULL 00/20] QMP queue

2014-05-16 Thread Luiz Capitulino
The following changes since commit 16a9189921bdb9e351f2f9baec16b376f8d71cdf: Merge remote-tracking branch 'remotes/kraxel/tags/pull-roms-2' into staging (2014-05-15 18:32:16 +0100) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch ch

[Qemu-devel] [PULL 02/20] qapi: Normalize marshalling's visitor initialization and cleanup

2014-05-16 Thread Luiz Capitulino
input visitor cleanup in input marshalling functions. No functional change, but the latter will be convenient when I change the error handling. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 8 scripts/qapi

[Qemu-devel] [PULL 07/20] qapi-visit.py: Clean up a sloppy use of field prefix

2014-05-16 Thread Luiz Capitulino
up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- scripts/qapi-visit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index 57be9bf..1e368be 100644 --- a/scripts/qapi-visi

[Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4

2014-05-20 Thread Luiz Capitulino
The Python "except Foo as x" syntax was only introduced in Python 2.6, but we aim to support Python 2.4 and later. Use the old-style "except Foo, x" syntax instead, thus fixing configure/compile on systems with older Python. Reported-by: Peter Maydell Signed-off-by: Luiz Capi

Re: [Qemu-devel] [PATCH] doc: add "setup" to list of migration states

2014-05-20 Thread Luiz Capitulino
On Fri, 16 May 2014 10:40:47 -0400 pe...@gridcentric.ca wrote: > From: Peter Feiner > > On a slow VM (e.g., nested), you see the "setup" state when you query the > migration status. > > Signed-off-by: Peter Feiner Applied to the qmp branch, thanks. > --- > qapi-schema.json |2 +- > qmp-

Re: [Qemu-devel] [PATCH] virtio-balloon: return empty data when no stats are available

2014-05-20 Thread Luiz Capitulino
On Mon, 19 May 2014 08:41:21 +0200 Ján Tomko wrote: > If the guest hasn't updated the stats yet, instead of returning > an error, return '-1' for the stats and '0' as 'last-update'. > > This lets applications ignore this without parsing the error message. > > Related libvirt patch and discussio

Re: [Qemu-devel] [PATCH] qga: Fix handle fd leak in acquire_privilege()

2014-05-20 Thread Luiz Capitulino
On Mon, 19 May 2014 15:26:03 +0800 wrote: > From: Gonglei > > token should be closed in all conditions. > So move CloseHandle(token) to "out" branch. Looks good to me. Michael, are you going to pick this one? > > Signed-off-by: Wang Rui > Signed-off-by: Gonglei > --- > qga/commands-win32.

Re: [Qemu-devel] [PATCH] qapi: zero-initialize all QMP command parameters

2014-05-21 Thread Luiz Capitulino
On Tue, 20 May 2014 12:20:39 -0500 Michael Roth wrote: > In general QMP command parameter values are specified by consumers of the > QMP/HMP interface, but in the case of optional parameters these values may > be left uninitialized. > > It is considered a bug for code to make use of optional par

[Qemu-devel] [PULL 0/3] QMP queue

2014-05-22 Thread Luiz Capitulino
u to fetch changes up to fc13d937269c1cd01a4b7720c1dcce01722727a2: qapi: zero-initialize all QMP command parameters (2014-05-21 09:25:31 -0400) ---- Luiz Capitulino (1): scripts/qapi.py: Avoid syntax not supported by Python 2.4 Mi

[Qemu-devel] [PULL 3/3] qapi: zero-initialize all QMP command parameters

2014-05-22 Thread Luiz Capitulino
izing all QMP command parameters to {0} in the marshalling code prior to passing them on to the QMP functions. Signed-off-by: Michael Roth Reported-by: Peter Maydell Tested-by: Peter Maydell Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- scr

[Qemu-devel] [PULL 2/3] scripts/qapi.py: Avoid syntax not supported by Python 2.4

2014-05-22 Thread Luiz Capitulino
ärber Signed-off-by: Luiz Capitulino --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 0265b40..86e9608 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -116,7 +116,7 @@ class QAPISchema: continue

[Qemu-devel] [PULL 1/3] doc: add "setup" to list of migration states

2014-05-22 Thread Luiz Capitulino
From: Peter Feiner On a slow VM (e.g., nested), you see the "setup" state when you query the migration status. Signed-off-by: Peter Feiner Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 2 +- qmp-commands.hx | 2 +- 2 files changed, 2 insert

Re: [Qemu-devel] [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Luiz Capitulino
On Fri, 23 May 2014 00:50:38 -0300 Marcelo Tosatti wrote: > > Then the guest triggers an RTC update, so qemu sends an event, but the > > event is lost. Then libvirtd starts again, and doesn't realize the > > event is lost. > > Yes, but that case is also true for any other QMP asynchronous event,

Re: [Qemu-devel] [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-23 Thread Luiz Capitulino
On Fri, 23 May 2014 10:48:18 -0300 Marcelo Tosatti wrote: > On Fri, May 23, 2014 at 03:35:19PM +0200, Markus Armbruster wrote: > > Luiz Capitulino writes: > > > > > On Fri, 23 May 2014 00:50:38 -0300 > > > Marcelo Tosatti wrote: > > > > > >

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

2014-10-09 Thread Luiz Capitulino
On Wed, 1 Oct 2014 18:43:44 +0200 Markus Armbruster wrote: > Commit 1f9296b avoids "other kinds of overflow" by limiting the > polling interval to UINT_MAX. The computations to protect are done in > 64 bits. This is indeed safe when unsigned is 32 bits, as it commonly > is. It isn't when unsi

Re: [Qemu-devel] [PATCH v8 0/2] Return error reasons to caller when calling qmp_dump_guest_memory

2014-10-09 Thread Luiz Capitulino
be an error, > Instead, check a local variable *local_err (Markus Armbruster) > v4 -> v5: > - Turn functions like write_elf64_note() to void (Luiz Capitulino) > v3 -> v4: > - Adjust the errp argument to the end > - Remove trailing '.' in error messages > v2 -&

Re: [Qemu-devel] [PATCH 1/1] hmp: Remove "info pcmcia"

2014-10-09 Thread Luiz Capitulino
ree bug, flagged > > by Coverity. Has never been used, because there has never been code > > to eject a PCMCIA card. > > > > Not worth fixing & converting to QMP. Remove it. Sorry for the long delay on this one. But this patch is more about PCMCIA support in QEMU than HMP, so I can provide my ACK, but I don't think this is HMP material. Acked-by: Luiz Capitulino

Re: [Qemu-devel] [PATCH] block.c: Fix type of IoOperationType variable in send_qmp_error_event()

2014-10-22 Thread Luiz Capitulino
'IoOperationType' (aka 'enum IoOperationType') [-Wenum-conversion] > qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action, > ~~ ^~ > > Correct the type to IoOperationType, and rename the variable > to &

Re: [Qemu-devel] [PATCH v5 0/3] monitor: add peripheral device del completion support

2014-10-22 Thread Luiz Capitulino
On Tue, 21 Oct 2014 19:46:03 +0800 Zhu Guihua wrote: > After inputting device_del command in monitor, we expect to list all > hotpluggable devices automatically by pressing tab key. This patchset provides > the function to list all peripheral devices such as memory devices. Igor, Marcel, is this

Re: [Qemu-devel] MAINTAINERS leaves too many files uncovered

2014-10-22 Thread Luiz Capitulino
On Wed, 22 Oct 2014 13:45:44 +0200 Markus Armbruster wrote: > >> qobject/Makefile.objs > >> qobject/json-lexer.c > >> qobject/json-parser.c > >> qobject/json-streamer.c > >> qobject/qbool.c > >> qobject/qdict.c > >> qobject/qerror.c > >> qobject/qfloat.c > >> qobject/qint.c > >> qobject/qjson.c >

[Qemu-devel] [PATCH] MAINTAINERS: add entry for qobject files

2014-10-22 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 206bf7e..5b97540 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -825,6 +825,12 @@ S: Supported F: qapi-schema.json T: git git://repo.or.cz/qemu/qmp

Re: [Qemu-devel] [PATCH v5 0/3] monitor: add peripheral device del completion support

2014-10-23 Thread Luiz Capitulino
On Tue, 21 Oct 2014 19:46:03 +0800 Zhu Guihua wrote: > After inputting device_del command in monitor, we expect to list all > hotpluggable devices automatically by pressing tab key. This patchset provides > the function to list all peripheral devices such as memory devices. Applied to the qmp br

[Qemu-devel] [PULL 4/7] MAINTAINERS: add entry for qobject files

2014-10-23 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8eed800..b4fac85 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -829,6 +829,12 @@ S: Supported F: qapi-schema.json T: git git://repo.or.cz/qemu/qmp

[Qemu-devel] [PULL 1/7] virtio-balloon: Tweak recent fix for integer overflow

2014-10-23 Thread Luiz Capitulino
heoretical; I'm not aware of such a system. Limit it to UINT32_MAX instead. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hw/virtio/virtio-balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.

[Qemu-devel] [PULL 5/7] qdev: add qdev_build_hotpluggable_device_list helper

2014-10-23 Thread Luiz Capitulino
From: Zhu Guihua For peripheral device del completion, add a function to build a list for hotpluggable devices. Signed-off-by: Zhu Guihua Reviewed-by: Marcel Apfelbaum Reviewed-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- hw/core/qdev.c | 13 + include/hw/qdev

[Qemu-devel] [PULL 0/7] QMP queue

2014-10-23 Thread Luiz Capitulino
r-upstream for you to fetch changes up to e799157c766d96506214059d8b75712a3e615431: monitor: delete device_del_bus_completion (2014-10-23 09:04:05 -0400) QMP patches ---

[Qemu-devel] [PULL 6/7] monitor: add del completion for peripheral device

2014-10-23 Thread Luiz Capitulino
From: Zhu Guihua Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua Reviewed-by: Marcel Apfelbaum Reviewed-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- monitor.c | 26 ++ 1 file changed, 26

[Qemu-devel] [PULL 7/7] monitor: delete device_del_bus_completion

2014-10-23 Thread Luiz Capitulino
From: Zhu Guihua device_del_bus_completion() that gathers devices from buses is unused; delete it. Signed-off-by: Zhu Guihua Reviewed-by: Marcel Apfelbaum Reviewed-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- monitor.c | 20 1 file changed, 20 deletions

[Qemu-devel] [PULL 3/7] dump: Turn some functions to void to make code cleaner

2014-10-23 Thread Luiz Capitulino
Blake Signed-off-by: Luiz Capitulino --- dump.c | 312 ++--- 1 file changed, 142 insertions(+), 170 deletions(-) diff --git a/dump.c b/dump.c index 07d2300..06a4915 100644 --- a/dump.c +++ b/dump.c @@ -100,7 +100,7 @@ static int fd_write_v

[Qemu-devel] [PULL 2/7] dump: Propagate errors into qmp_dump_guest_memory()

2014-10-23 Thread Luiz Capitulino
qmp_dump_guest_memory() can return a more useful error. Signed-off-by: zhanghailiang Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- dump.c | 165 - 1 file changed, 82 insertions(+), 83 deletions(-) diff

<    7   8   9   10   11   12   13   14   15   16   >