[Qemu-devel] [PATCH v2 0/8]: Introduce the RunState type

2011-08-10 Thread Luiz Capitulino
It replaces the VMSTOP macros and allows us to drop some global variables. Additionally, the problem with issuing 'cont' when the VM is in bad state is addressed and we make the current state available in QMP and HMP. changelog - v2 o Rename the new type from QemuState to RunState (al

[Qemu-devel] [PATCH 8/8] HMP: info status: Print the VM state

2011-08-10 Thread Luiz Capitulino
field as returned by the query-status QMP command and it's only printed if "status" is not "running" or "paused". Example: VM status: paused (shutdown) PS: libvirt uses "info status" when using HMP, but the new format should not break it. Si

[Qemu-devel] [PATCH 5/8] Drop the vm_running global variable

2011-08-10 Thread Luiz Capitulino
Use vm_is_running() instead, which is introduced by this commit and is part of the RunState API. Signed-off-by: Luiz Capitulino --- cpus.c|9 - gdbstub.c |4 ++-- hw/etraxfs_dma.c |2 +- hw/kvmclock.c |2 +- hw/virtio.c |2

[Qemu-devel] [PATCH 7/8] QMP: query-status: Introduce 'status' key

2011-08-10 Thread Luiz Capitulino
This new key reports the current VM status to clients. Please, check the documentation being added in this commit for more details. Signed-off-by: Luiz Capitulino --- monitor.c |3 +-- qmp-commands.hx | 21 - sysemu.h|1 + vl.c| 24

[Qemu-devel] [PATCH 2/8] Replace the VMSTOP macros with a proper state type

2011-08-10 Thread Luiz Capitulino
rt() calls vm_state_notify() with reason=0, which turns out to be VMSTOP_USER. This commit fixes that by replacing the VMSTOP macros with a proper state type called RunState. Signed-off-by: Luiz Capitulino --- audio/audio.c |2 +- cpus.c | 12 ++-- gdbstub.c

[Qemu-devel] [PATCH 6/8] Monitor: Don't allow cont on bad VM state

2011-08-10 Thread Luiz Capitulino
issued 2. automatically transition to RSTATE_PAUSED during system_reset Signed-off-by: Luiz Capitulino --- monitor.c |5 + qerror.c |4 qerror.h |3 +++ vl.c |4 4 files changed, 16 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 3de862b

[Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-08-10 Thread Luiz Capitulino
added and the current state is stored. Signed-off-by: Luiz Capitulino --- cpus.c |1 + migration.c |8 +++- sysemu.h| 10 +- vl.c| 20 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index d53321b..e7

[Qemu-devel] [PATCH 4/8] Drop the incoming_expected global variable

2011-08-10 Thread Luiz Capitulino
Test against RSTATE_IN_MIGRATE instead. Please, note that the RSTATE_IN_MIGRATE state is only set when all the initial VM setup is done, while 'incoming_expected' was set right in the beginning when parsing command-line options. Shouldn't be a problem as far as I could check. Sign

Re: [Qemu-devel] [PATCH] monitor: fix build breakage for !CONFIG_VNC

2011-08-11 Thread Luiz Capitulino
On Wed, 10 Aug 2011 15:18:42 +0100 Jamie Iles wrote: > Commit c62f6d1 (monitor: fix build breakage with --disable-vnc) > conditionalised some VNC setup code but left an unused variable. Move > the variable into the conditional code to fix the build breakage. > > Cc: Luiz C

Re: [Qemu-devel] [PATCH v2 0/8]: Introduce the RunState type

2011-08-15 Thread Luiz Capitulino
On Sun, 14 Aug 2011 11:45:16 -0500 Anthony Liguori wrote: > On 08/10/2011 03:33 PM, Luiz Capitulino wrote: > > It replaces the VMSTOP macros and allows us to drop some global variables. > > > > Additionally, the problem with issuing 'cont' when the VM is in bad sta

Re: [Qemu-devel] [PATCH 3/3] qapi: convert sendkey

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 14:12:39 +0100 "Daniel P. Berrange" wrote: > On Fri, May 25, 2012 at 10:06:11AM -0300, Luiz Capitulino wrote: > > On Fri, 25 May 2012 08:34:54 +0100 > > "Daniel P. Berrange" wrote: > > > > > On Fri, May 25, 2012 at 02:20:3

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 15:14:39 +0200 Paolo Bonzini wrote: > Il 25/05/2012 15:07, Luiz Capitulino ha scritto: > > On Fri, 25 May 2012 14:59:25 +0200 > > Paolo Bonzini wrote: > > > >> Il 25/05/2012 14:53, Luiz Capitulino ha scritto: > >>>>> I agr

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 15:19:28 +0200 Paolo Bonzini wrote: > Il 25/05/2012 15:18, Luiz Capitulino ha scritto: > >> > > >> > Still not sure what you mean... > > I meant it's a similar case. kqemu was a special case and maintenance > > burden. > > W

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 15:37:15 +0200 Paolo Bonzini wrote: > Il 25/05/2012 15:30, Luiz Capitulino ha scritto: > > On Fri, 25 May 2012 15:19:28 +0200 > > Paolo Bonzini wrote: > > > >> Il 25/05/2012 15:18, Luiz Capitulino ha scritto: > >>>>> >

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 15:47:28 +0200 Paolo Bonzini wrote: > Il 25/05/2012 15:43, Luiz Capitulino ha scritto: > >> Yeah, VDE probably includes something like an hub. But then we could > >> drop even "-net socket", "-net udp", "-net dump", and on

Re: [Qemu-devel] [PATCH 3/3] qapi: convert sendkey

2012-05-25 Thread Luiz Capitulino
On Fri, 25 May 2012 11:32:01 +0800 Amos Kong wrote: > Convert 'sendkey' to use. do_sendkey() depends on some variables > in monitor.c, so reserve qmp_sendkey() to monitor.c > Rename 'string' to 'keys', rename 'hold_time' to 'hold-time' Splitting the args rename to a different patch would make re

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-25 Thread Luiz Capitulino
On Thu, 24 May 2012 19:22:52 +0300 Alon Levy wrote: > For all devices print id, mode and guest_bug status. Is qxl really tied to spice? In the meaning that it's impossible to use it without spice? Wouldn't it be better to have 'info display' instead? > Known problems: Prints devices from highes

Re: [Qemu-devel] Block job commands in QEMU 1.2 [v2, including support for replication]

2012-05-25 Thread Luiz Capitulino
On Thu, 24 May 2012 15:41:29 +0200 Paolo Bonzini wrote: > * block-stream: I would still like to add on_error to the existing > block-stream command, if only to ease unit testing. Concerns about the > stability of the API can be handled by adding introspection (exporting > the schema), which is n

[Qemu-devel] [PATCH qmp-next 00/14]: qapi: convert screendump

2012-05-25 Thread Luiz Capitulino
Converting the screendump command is simple and shouldn't take more than or or two patches, the complicated part is to report all errors correctly. I hope I didn't go too far there, but at least this series does the right thing (or is very near to). console.c| 7 ++-- console.h

[Qemu-devel] [PATCH 01/14] qerror: extend QERR_TOO_MANY_FILES

2012-05-25 Thread Luiz Capitulino
Specify it's too many open files in the system (ENFILE). There's no compatibility problem because it's not used anywhere today. Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++-- qerror.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qerror.c b

[Qemu-devel] [PATCH 07/14] omap_lcdc: rename ppm_save() to omap_ppm_save()

2012-05-25 Thread Luiz Capitulino
Avoids confusion with the global ppm_save() defined in hw/vga.c. Signed-off-by: Luiz Capitulino --- hw/omap_lcdc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/omap_lcdc.c b/hw/omap_lcdc.c index 4a08e9d..6d2e83a 100644 --- a/hw/omap_lcdc.c +++ b/hw

[Qemu-devel] [PATCH 12/14] tcx: tcx24_screen_dump(): add error handling

2012-05-25 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/tcx.c | 50 -- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 74a7085..4027

[Qemu-devel] [PATCH 04/14] cutils: introduce qemu_fprintf_err()

2012-05-25 Thread Luiz Capitulino
A fprintf() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 31 +++ qemu-common.h | 1 + 2 files changed, 32 insertions(+) diff --git a/cutils.c b/cutils.c index bdee130..f5b02b4 100644 --- a/cutils.c +++ b/cutils.c

[Qemu-devel] [PATCH 03/14] cutils: introduce qemu_fopen_err()

2012-05-25 Thread Luiz Capitulino
A fopen() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 42 ++ qemu-common.h | 3 +++ 2 files changed, 45 insertions(+) diff --git a/cutils.c b/cutils.c index af308cd..bdee130 100644 --- a/cutils.c +++ b

[Qemu-devel] [PATCH 13/14] tcx: tcx_screen_dump(): add error handling

2012-05-25 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/tcx.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 4027363..7aa1abe 100644 --- a

[Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-25 Thread Luiz Capitulino
New errors for write() and open() failures. Will be used by the next commits. Signed-off-by: Luiz Capitulino --- qerror.c | 24 qerror.h | 18 ++ 2 files changed, 42 insertions(+) diff --git a/qerror.c b/qerror.c index 2c97382..58e4570 100644 --- a

[Qemu-devel] [PATCH 08/14] console: vga_hw_screen_dump_ptr: take an Error argument

2012-05-25 Thread Luiz Capitulino
. Signed-off-by: Luiz Capitulino --- console.c | 2 +- console.h | 4 +++- hw/blizzard.c | 2 +- hw/g364fb.c | 3 ++- hw/omap_lcdc.c | 3 ++- hw/qxl.c| 5 +++-- hw/tcx.c| 12 hw/vga.c| 6 -- hw/vmware_vga.c | 5 +++-- 9 files

[Qemu-devel] [PATCH 06/14] cutils: introduce qemu_fwrite_err()

2012-05-25 Thread Luiz Capitulino
A fwrite() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 15 +++ qemu-common.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/cutils.c b/cutils.c index 83edb43..63fdfc0 100644 --- a/cutils.c +++ b/cutils.c @@ -634,3 +634,18 @@ int

[Qemu-devel] [PATCH 05/14] cutils: introduce qemu_fputc_err()

2012-05-25 Thread Luiz Capitulino
A fputc() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 12 qemu-common.h | 1 + 2 files changed, 13 insertions(+) diff --git a/cutils.c b/cutils.c index f5b02b4..83edb43 100644 --- a/cutils.c +++ b/cutils.c @@ -622,3 +622,15 @@ int

[Qemu-devel] [PATCH 10/14] omap_lcdc: omap_ppm_save(): add error handling

2012-05-25 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/omap_lcdc.c | 53 +++-- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/hw/omap_lcdc.c b/hw/omap_lcd

[Qemu-devel] [PATCH 09/14] vga: ppm_save(): add error handling

2012-05-25 Thread Luiz Capitulino
error is not passed up yet, as vga_hw_screen_dump() still calls consoles[0]->hw_screen_dump() with errp=NULL. The error will be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/blizzard.c | 2 +- hw/qx

[Qemu-devel] [PATCH 14/14] qapi: convert screendump

2012-05-25 Thread Luiz Capitulino
Also activates error reporting from devices. Signed-off-by: Luiz Capitulino --- console.c| 7 --- console.h| 1 - hmp-commands.hx | 5 ++--- hmp.c| 9 + hmp.h| 1 + monitor.c| 6 -- qapi-schema.json | 24

[Qemu-devel] [PATCH 11/14] g364fb: g364fb_screen_dump(): add error handling

2012-05-25 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/g364fb.c | 48 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/g364fb.c b/hw/g364fb.c index 4981

Re: [Qemu-devel] [PATCH 14/14] qapi: convert screendump

2012-05-28 Thread Luiz Capitulino
On Mon, 28 May 2012 11:56:31 +0300 Alon Levy wrote: > On Fri, May 25, 2012 at 04:41:19PM -0300, Luiz Capitulino wrote: > > One small note below. > > > Also activates error reporting from devices. > > > > Signed-off-by: Luiz Capitulino > > --- > > co

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-28 Thread Luiz Capitulino
On Mon, 28 May 2012 12:08:13 +0300 Alon Levy wrote: > On Fri, May 25, 2012 at 11:43:11AM -0300, Luiz Capitulino wrote: > > On Thu, 24 May 2012 19:22:52 +0300 > > Alon Levy wrote: > > > > > For all devices print id, mode and guest_bug status. > > > > I

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-28 Thread Luiz Capitulino
On Mon, 28 May 2012 12:17:04 +0100 Stefan Hajnoczi wrote: > What we need to decide is whether it's okay to drop QEMU "VLANs" > completely and change dump command-line syntax? I'd vote for dropping it. > I think vlan-hub doesn't hurt anyone because the code has been isolated > and we keep backwa

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-28 Thread Luiz Capitulino
On Mon, 28 May 2012 16:36:16 +0300 Alon Levy wrote: > On Mon, May 28, 2012 at 10:13:28AM -0300, Luiz Capitulino wrote: > > On Mon, 28 May 2012 12:08:13 +0300 > > Alon Levy wrote: > > > > > On Fri, May 25, 2012 at 11:43:11AM -0300, Luiz Capitulino wrote: > &

Re: [Qemu-devel] [PATCH 3/3] qapi: convert sendkey

2012-05-29 Thread Luiz Capitulino
On Tue, 29 May 2012 20:17:53 +0800 Amos Kong wrote: > On 05/29/2012 07:57 PM, Amos Kong wrote: > > On 05/25/2012 09:14 PM, Anthony Liguori wrote: > >> On 05/24/2012 10:51 PM, Eric Blake wrote: > >>> On 05/24/2012 09:32 PM, Amos Kong wrote: > Convert 'sendkey' to use. do_sendkey() depends on

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-29 Thread Luiz Capitulino
On Tue, 29 May 2012 09:25:40 +0200 Gerd Hoffmann wrote: > Hi, > > >> How would that work? I have QXLInfo that only makes sense when the > >> information is about a qxl device. Can't have opaque data in a QMP > >> response, so would this be a "info display qxl" "info display cirrus" > >> etc. o

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-29 Thread Luiz Capitulino
On Tue, 29 May 2012 17:51:50 +0300 Alon Levy wrote: > On Tue, May 29, 2012 at 10:38:20AM -0300, Luiz Capitulino wrote: > > On Tue, 29 May 2012 09:25:40 +0200 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > >> How would th

Re: [Qemu-devel] [PATCH v2] hmp/qxl: info spice: add qxl info

2012-05-30 Thread Luiz Capitulino
On Wed, 30 May 2012 11:54:11 +0300 Alon Levy wrote: > On Tue, May 29, 2012 at 01:44:35PM -0300, Luiz Capitulino wrote: > > On Tue, 29 May 2012 17:51:50 +0300 > > Alon Levy wrote: > > > > > On Tue, May 29, 2012 at 10:38:20AM -0300, Luiz Capitulino wrote: > &

[Qemu-devel] [PATCH qmp-next v2 00/14]: qapi: convert screendump

2012-05-30 Thread Luiz Capitulino
Converting the screendump command is simple and shouldn't take more than or or two patches, the complicated part is to report all errors correctly. I hope I didn't go too far there, but at least this series does the right thing (or is very near to). o V2 - fix typos in various places [Alon/Me]

[Qemu-devel] [PATCH 04/14] cutils: introduce qemu_fprintf_err()

2012-05-30 Thread Luiz Capitulino
A fprintf() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 31 +++ qemu-common.h | 1 + 2 files changed, 32 insertions(+) diff --git a/cutils.c b/cutils.c index 85dbb06..7bbd1b7 100644 --- a/cutils.c +++ b/cutils.c

[Qemu-devel] [PATCH 12/14] tcx: tcx24_screen_dump(): add error handling

2012-05-30 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/tcx.c | 50 -- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 74a7085..4027

[Qemu-devel] [PATCH 01/14] qerror: extend QERR_TOO_MANY_FILES

2012-05-30 Thread Luiz Capitulino
Specify it's too many open files in system (ENFILE). There's no compatibility issue because QERR_TOO_MANY_FILES is actually not used today. Signed-off-by: Luiz Capitulino --- qerror.c | 4 ++-- qerror.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/

[Qemu-devel] [PATCH 14/14] qapi: convert screendump

2012-05-30 Thread Luiz Capitulino
Also activates full error reporting from devices. Signed-off-by: Luiz Capitulino --- console.c| 7 --- console.h| 1 - hmp-commands.hx | 3 +-- hmp.c| 9 + hmp.h| 1 + monitor.c| 6 -- qapi-schema.json | 25

[Qemu-devel] [PATCH 09/14] vga: ppm_save(): add error handling

2012-05-30 Thread Luiz Capitulino
error is not passed up yet, as vga_hw_screen_dump() still calls consoles[0]->hw_screen_dump() with errp=NULL. The error will be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/blizzard.c | 2 +- hw/qx

[Qemu-devel] [PATCH 06/14] cutils: introduce qemu_fwrite_err()

2012-05-30 Thread Luiz Capitulino
A fwrite() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 15 +++ qemu-common.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/cutils.c b/cutils.c index c44ead9..646e08a 100644 --- a/cutils.c +++ b/cutils.c @@ -637,3 +637,18 @@ int

[Qemu-devel] [PATCH 05/14] cutils: introduce qemu_fputc_err()

2012-05-30 Thread Luiz Capitulino
A fputc() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 12 qemu-common.h | 1 + 2 files changed, 13 insertions(+) diff --git a/cutils.c b/cutils.c index 7bbd1b7..c44ead9 100644 --- a/cutils.c +++ b/cutils.c @@ -625,3 +625,15 @@ int

[Qemu-devel] [PATCH 11/14] g364fb: g364fb_screen_dump(): add error handling

2012-05-30 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/g364fb.c | 48 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/hw/g364fb.c b/hw/g364fb.c index 4981

[Qemu-devel] [PATCH 03/14] cutils: introduce qemu_fopen_err()

2012-05-30 Thread Luiz Capitulino
A fopen() wrapper that takes an Error argument. Signed-off-by: Luiz Capitulino --- cutils.c | 45 + qemu-common.h | 3 +++ 2 files changed, 48 insertions(+) diff --git a/cutils.c b/cutils.c index af308cd..85dbb06 100644 --- a/cutils.c +++ b

[Qemu-devel] [PATCH 07/14] omap_lcdc: rename ppm_save() to omap_ppm_save()

2012-05-30 Thread Luiz Capitulino
Avoids confusion with the global ppm_save() defined in hw/vga.c. Signed-off-by: Luiz Capitulino --- hw/omap_lcdc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/omap_lcdc.c b/hw/omap_lcdc.c index 4a08e9d..6d2e83a 100644 --- a/hw/omap_lcdc.c +++ b/hw

Re: [Qemu-devel] [PATCH 3/3] qapi: convert sendkey

2012-05-30 Thread Luiz Capitulino
On Wed, 30 May 2012 18:17:54 +0800 Amos Kong wrote: > On 29/05/12 21:24, Luiz Capitulino wrote: > > On Tue, 29 May 2012 20:17:53 +0800 > > Amos Kong wrote: > > > >> On 05/29/2012 07:57 PM, Amos Kong wrote: > >>> On 05/25/2012 09:14 PM, Anthony Liguori

[Qemu-devel] [PATCH 13/14] tcx: tcx_screen_dump(): add error handling

2012-05-30 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/tcx.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 4027363..7aa1abe 100644 --- a

[Qemu-devel] [PATCH 10/14] omap_lcdc: omap_ppm_save(): add error handling

2012-05-30 Thread Luiz Capitulino
be propagated up when screendump is converted to the QAPI. That will be done by a later commit. Signed-off-by: Luiz Capitulino --- hw/omap_lcdc.c | 53 +++-- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/hw/omap_lcdc.c b/hw/omap_lcd

[Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-30 Thread Luiz Capitulino
New errors for write() and open() failures. Will be used by the next commits. Signed-off-by: Luiz Capitulino --- qerror.c | 28 qerror.h | 21 + 2 files changed, 49 insertions(+) diff --git a/qerror.c b/qerror.c index 6c78759..97670a3 100644

[Qemu-devel] [PATCH 08/14] console: vga_hw_screen_dump_ptr: take an Error argument

2012-05-30 Thread Luiz Capitulino
. Signed-off-by: Luiz Capitulino --- console.c | 2 +- console.h | 4 +++- hw/blizzard.c | 2 +- hw/g364fb.c | 3 ++- hw/omap_lcdc.c | 3 ++- hw/qxl.c| 5 +++-- hw/tcx.c| 12 hw/vga.c| 6 -- hw/vmware_vga.c | 5 +++-- 9 files

Re: [Qemu-devel] [PATCH 0/2] qmp: implement readline handlig for stdio

2012-05-30 Thread Luiz Capitulino
On Wed, 30 May 2012 16:19:43 +0200 Kevin Wolf wrote: > Am 30.05.2012 12:01, schrieb Pavel Hrdina: > > For debug it would be nice to have a same functionality for the qmp monitor > > on stdio as the hmp monitor on stdio has. For this purpose we also use > > readline mode for qmp monitor on stdio.

Re: [Qemu-devel] [PATCH v2 0/2] qmp: implement readline handlig for stdio

2012-05-30 Thread Luiz Capitulino
On Wed, 30 May 2012 18:01:06 +0200 Pavel Hrdina wrote: > For debug it would be nice to have a same functionality for the qmp monitor > on stdio as the hmp monitor on stdio has. For this purpose we also use > readline mode for qmp monitor on stdio. I dislike this series. It's adding a user featur

Re: [Qemu-devel] [PATCH v2 3/3] Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events

2012-05-30 Thread Luiz Capitulino
On Mon, 21 May 2012 17:59:53 +0100 "Daniel P. Berrange" wrote: > From: "Daniel P. Berrange" > > Allow certain event types to be rate limited to avoid flooding > monitor clients. The monitor_protocol_event() method is changed > such that instead of immediately emitting the event to Monitor > ins

Re: [Qemu-devel] [PATCH 1/3] start vm after reseting it

2012-05-30 Thread Luiz Capitulino
On Mon, 21 May 2012 14:49:32 +0800 Wen Congyang wrote: > The guest should run after reseting it, but it does not > run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. > > Signed-off-by: Wen Congyang > --- > vl.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) >

Re: [Qemu-devel] [PATCH 3/3] deal with guest panicked event

2012-05-30 Thread Luiz Capitulino
On Mon, 21 May 2012 14:50:51 +0800 Wen Congyang wrote: > When the guest is panicked, it will write 0x1 to the port 0x505. So if > qemu reads 0x1 from this port, we can do the folloing three things > according to the parameter -onpanic: > 1. emit QEVENT_GUEST_PANICKED only > 2. emit QEVENT_GUEST_P

Re: [Qemu-devel] [PATCH 0/2] qmp: implement readline handlig for stdio

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 10:10:07 +0200 Kevin Wolf wrote: > Am 30.05.2012 18:41, schrieb Luiz Capitulino: > > On Wed, 30 May 2012 16:19:43 +0200 > > Kevin Wolf wrote: > > > >> Am 30.05.2012 12:01, schrieb Pavel Hrdina: > >>> For debug it would be nic

Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 12:42:34 +0200 Paolo Bonzini wrote: > Il 30/05/2012 16:14, Luiz Capitulino ha scritto: > > New errors for write() and open() failures. Will be used by the > > next commits. > > Ouch. We have already these errors: > > #define QERR_OPEN_FI

Re: [Qemu-devel] [PATCH 01/14] qerror: extend QERR_TOO_MANY_FILES

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 12:43:24 +0200 Paolo Bonzini wrote: > Il 30/05/2012 16:14, Luiz Capitulino ha scritto: > > Specify it's too many open files in system (ENFILE). > > > > There's no compatibility issue because QERR_TOO_MANY_FILES is actually > > no

Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 16:25:48 +0200 Paolo Bonzini wrote: > Il 31/05/2012 16:06, Luiz Capitulino ha scritto: > >> What about errno values? Let's add an enum QemuErrno and convert host > >> errnos to that enum. Enums are sent as strings, so they are neutral to > >

Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 16:54:47 +0200 Paolo Bonzini wrote: > Il 31/05/2012 16:31, Luiz Capitulino ha scritto: > >>>> Errors are not QAPI-ized yet, so we can add errno values to the above > >>>> five errors too. > >>> > >>> We've

Re: [Qemu-devel] [PATCH 0/2] qmp: implement readline handlig for stdio

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 17:18:18 +0200 Paolo Bonzini wrote: > Il 31/05/2012 15:49, Luiz Capitulino ha scritto: > >> Seriously? The natural thing to do is -qmp stdio, and I don't read any > >> wikis for that. > >> > >> It's nice that you can get some

Re: [Qemu-devel] [PATCH 02/14] qerror: add new errors

2012-05-31 Thread Luiz Capitulino
On Thu, 31 May 2012 17:49:42 +0200 Paolo Bonzini wrote: > Il 31/05/2012 17:44, Luiz Capitulino ha scritto: > >> One is "do not shoehorn errors into errno values". So for QOM invalid > >> values we > >> have PropertyValueBad, not a generic InvalidArgu

Re: [Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-06-04 Thread Luiz Capitulino
On Mon, 04 Jun 2012 12:56:41 +0800 Anthony Liguori wrote: > On 05/25/2012 08:53 PM, Luiz Capitulino wrote: > > On Fri, 25 May 2012 13:01:37 +0100 > > Stefan Hajnoczi wrote: > > > >> I agree it would be nice to drop entirely but I don't feel happy doing >

[Qemu-devel] [PULL 00/29]: QMP queue

2012-06-05 Thread Luiz Capitulino
): Add 'query-events' command to QMP to query async events Luiz Capitulino (16): qemu-option: qemu_opts_create(): use error_set() qemu-option: parse_option_number(): use error_set() qemu-option: parse_option_bool(): use error_set() qemu-option: parse_option_s

[Qemu-devel] [PATCH 02/29] Add API to check whether a physical address is I/O address

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang This API will be used in the following patch. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- cpu-common.h | 4 exec.c | 12 2 files changed, 16 insertions(+) diff --git a/cpu-common.h b/cpu-common.h index dca5175..1fe3280 100644

[Qemu-devel] [PATCH 01/29] Add API to create memory mapping list

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang The memory mapping list stores virtual address and physical address mapping. The virtual address and physical address are contiguous in the mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang Signed-off-by: Luiz

[Qemu-devel] [PATCH 20/29] qemu-option: introduce qemu_opt_set_err()

2012-06-05 Thread Luiz Capitulino
This is like qemu_opt_set(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_opt_set(). Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 6 ++ qemu-option.h | 2 ++ 2 files changed, 8 insertions

[Qemu-devel] [PATCH 04/29] Add API to check whether paging mode is enabled

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang This API will be used in the following patch. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- cpu-all.h | 6 ++ target-i386/arch_memory_mapping.c | 7 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cpu

[Qemu-devel] [PATCH 29/29] Add 'query-events' command to QMP to query async events

2012-06-05 Thread Luiz Capitulino
{"name": "BLOCK_JOB_COMPLETED"}, ...snip... {"name": "SHUTDOWN"}]} * monitor.c: Turn MonitorEvent -> string conversion into a lookup from a static table of constant strings. Add impl of qmp_query_events monitor command handler *

[Qemu-devel] [PATCH 28/29] qapi: convert netdev_del

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- hmp-commands.hx | 3 +-- hmp.c| 9 + hmp.h| 1 + net.c| 11 +-- net.h| 1 - qapi-schema.json | 14 ++ qmp-commands.hx

[Qemu-devel] [PATCH 27/29] qapi: convert netdev_add

2012-06-05 Thread Luiz Capitulino
for netdev_add(). This is coded by hand and not auto-generated (gen=no in the schema). The reason for this it's a lot easier and simpler to with QemuOpts this way 3. hmp_netdev_add(): HMP front-end. This design was suggested by Paolo Bonzini. Signed-off-by: Luiz Capitulino

[Qemu-devel] [PATCH 22/29] qerror: introduce QERR_INVALID_OPTION_GROUP

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qerror.c | 4 qerror.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 5092fe7..92c4eff 100644 --- a/qerror.c +++ b/qerror.c @@ -156,6 +156,10 @@ static const QErrorStringTable qerror_table

[Qemu-devel] [PATCH 15/29] qemu-option: parse_option_bool(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that set_option_parameter() callers still expect automatic error reporting with QError, so set_option_parameter() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 24 1 file changed

[Qemu-devel] [PATCH 05/29] Add API to get memory mapping

2012-06-05 Thread Luiz Capitulino
referenced by the page table. So if you want to use crash to anaylze the vmcore, please do not specify -p option. the reason why the -p option is not default explicitly: guest machine in a catastrophic state can have corrupted memory, which we cannot trust. Signed-off-by: Wen Congyang Signed-of

[Qemu-devel] [PATCH 23/29] qemu-config: find_list(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-config.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a

[Qemu-devel] [PATCH 19/29] qemu-option: opt_set(): use error_set()

2012-06-05 Thread Luiz Capitulino
The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 31

[Qemu-devel] [PATCH 07/29] target-i386: Add API to write elf notes to core file

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- Makefile.target | 1 + configure | 4 + cpu-

[Qemu-devel] [PATCH 24/29] qemu-config: introduce qemu_find_opts_err()

2012-06-05 Thread Luiz Capitulino
This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-config.c | 5 + qemu-config.h | 3 +++ 2 files changed, 8

[Qemu-devel] [PATCH 16/29] qemu-option: parse_option_size(): use error_set()

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index b5da116..42bb685 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -203,7 +203,8 @@ static void

[Qemu-devel] [PATCH 17/29] qemu-option: qemu_opt_parse(): use error_set()

2012-06-05 Thread Luiz Capitulino
The functions opt_set() and qemu_opts_validate() both call qemu_opt_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 36

[Qemu-devel] [PATCH 21/29] qemu-option: qemu_opts_from_qdict(): use error_set()

2012-06-05 Thread Luiz Capitulino
do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- hw/qdev-monitor.c | 7 +-- net.c | 5 - qemu-option.c | 31 --- qemu-option.h

[Qemu-devel] [PATCH 14/29] qemu-option: parse_option_number(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that qemu_opt_parse() callers still expect automatic error reporting with QError, so qemu_opts_parse() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- qemu-option.c | 26 +++--- 1 file changed, 19

Re: [Qemu-devel] [PATCH 1/3] qmp/hmp: Add QMP getfd command that returns fd

2012-06-05 Thread Luiz Capitulino
On Mon, 4 Jun 2012 09:10:08 -0400 Corey Bryant wrote: > This patch adds QMP support for the getfd command using the QAPI framework. > Like the HMP getfd command, it is used to pass a file descriptor via > SCM_RIGHTS. However, the QMP getfd command also returns the received file > descriptor, wh

[Qemu-devel] [PATCH 09/29] target-i386: add API to get dump info

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Note: on x86 box, the class is ELFCLASS64 if the memory is larger than 4G. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- cpu-all.h

[Qemu-devel] [PATCH 18/29] qemu-option: qemu_opts_validate(): use error_set()

2012-06-05 Thread Luiz Capitulino
net_client_init() propagates the error up by calling qerror_report_err(), because its users expect QError semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- net.c | 6 +- qemu-option.c | 13 + qemu-option.h | 2 +- 3 files changed, 11 insertions

[Qemu-devel] [PATCH 03/29] implement cpu_get_memory_mapping()

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang Signed-off-by:

[Qemu-devel] [PATCH 08/29] target-i386: Add API to write cpu status to core file

2012-06-05 Thread Luiz Capitulino
d-off-by: Luiz Capitulino --- cpu-all.h | 18 ++ target-i386/arch_dump.c | 149 2 files changed, 167 insertions(+) diff --git a/cpu-all.h b/cpu-all.h index a71e887..a167bac 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -547,6 +547,10 @

[Qemu-devel] [PATCH 11/29] make gdb_id() generally avialable and rename it to cpu_index()

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang The following patch also needs this API, so make it generally avialable. The function gdb_id() will not be used in gdbstub.c now, so its name is not suitable, and rename it to cpu_index() Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- gdbstub.c | 19

[Qemu-devel] [PATCH 06/29] Add API to get memory mapping without do paging

2012-06-05 Thread Luiz Capitulino
). This patch provides a API to do this thing, and it will be used in the following patch. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- memory_mapping.c | 9 + memory_mapping.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/memory_mapping.c b/memory_mapping.c

[Qemu-devel] [PATCH 26/29] net: net_client_init(): use error_set()

2012-06-05 Thread Luiz Capitulino
Callers are changed to use qerror_report_err() to keep their QError semantics. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- hw/pci-hotplug.c | 8 ++-- hw/usb/dev-network.c | 7 +-- net.c| 54

[Qemu-devel] [PATCH 12/29] introduce a new monitor command 'dump-guest-memory' to dump guest's memory

2012-06-05 Thread Luiz Capitulino
. Signed-off-by: Wen Congyang Signed-off-by: Luiz Capitulino --- Makefile.target | 2 + dump.c | 883 +++ elf.h| 5 + hmp-commands.hx | 28 ++ hmp.c| 22 ++ hmp.h| 1 + memory_mappi

[Qemu-devel] [PATCH 25/29] net: purge the monitor object from all init functions

2012-06-05 Thread Luiz Capitulino
The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- hw/pci-hotplug.c | 2 +- hw/usb/dev-network.c | 2 +- net.c| 18 +++

[Qemu-devel] [PATCH 13/29] qemu-option: qemu_opts_create(): use error_set()

2012-06-05 Thread Luiz Capitulino
conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- blockdev.c | 2 +- hw/usb/dev-storage.c | 2 +- hw/watchdog.c| 2 +- qemu-char.c | 8 ++-- qem

<    12   13   14   15   16   17   18   19   20   21   >