qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: kraxel@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async
Date: Mon, 5 Mar 2012 17:17:03 +0200	[thread overview]
Message-ID: <20120305151703.GJ22994@garlic.tlv.redhat.com> (raw)
In-Reply-To: <4F54CEA2.10808@codemonkey.ws>

On Mon, Mar 05, 2012 at 08:33:06AM -0600, Anthony Liguori wrote:
> On 03/05/2012 08:16 AM, Alon Levy wrote:
> >adds a handler for the following qmp screendump-async command.
> >
> >graphics_console_init signature change required touching every user, but
> >no implementation of the new vga_hw_screen_dump_async_ptr is provided
> >in this patch.
> >
> >Signed-off-by: Alon Levy<alevy@redhat.com>
> >---
> >  console.c            |    4 ++++
> >  console.h            |    5 +++++
> >  hw/blizzard.c        |    2 +-
> >  hw/cirrus_vga.c      |    4 ++--
> >  hw/exynos4210_fimd.c |    3 ++-
> >  hw/g364fb.c          |    2 +-
> >  hw/jazz_led.c        |    3 ++-
> >  hw/milkymist-vgafb.c |    2 +-
> >  hw/musicpal.c        |    2 +-
> >  hw/omap_dss.c        |    4 +++-
> >  hw/omap_lcdc.c       |    2 +-
> >  hw/pl110.c           |    2 +-
> >  hw/pxa2xx_lcd.c      |    2 +-
> >  hw/qxl.c             |    3 ++-
> >  hw/sm501.c           |    4 ++--
> >  hw/ssd0303.c         |    2 +-
> >  hw/ssd0323.c         |    2 +-
> >  hw/tc6393xb.c        |    1 +
> >  hw/tcx.c             |    4 ++--
> >  hw/vga-isa-mm.c      |    3 ++-
> >  hw/vga-isa.c         |    3 ++-
> >  hw/vga-pci.c         |    3 ++-
> >  hw/vga_int.h         |    1 +
> >  hw/vmware_vga.c      |    3 ++-
> >  hw/xenfb.c           |    2 ++
> >  25 files changed, 45 insertions(+), 23 deletions(-)
> >
> >diff --git a/console.c b/console.c
> >index 25d8acb..9a49e93 100644
> >--- a/console.c
> >+++ b/console.c
> >@@ -124,6 +124,7 @@ struct TextConsole {
> >      vga_hw_update_ptr hw_update;
> >      vga_hw_invalidate_ptr hw_invalidate;
> >      vga_hw_screen_dump_ptr hw_screen_dump;
> >+    vga_hw_screen_dump_async_ptr hw_screen_dump_async;
> >      vga_hw_text_update_ptr hw_text_update;
> >      void *hw;
> >
> >@@ -1403,6 +1404,8 @@ DisplayState *graphic_console_init(vga_hw_update_ptr update,
> >                                     vga_hw_invalidate_ptr invalidate,
> >                                     vga_hw_screen_dump_ptr screen_dump,
> >                                     vga_hw_text_update_ptr text_update,
> >+                                   vga_hw_screen_dump_async_ptr
> >+                                                    screen_dump_async,
> >                                     void *opaque)
> >  {
> >      TextConsole *s;
> >@@ -1421,6 +1424,7 @@ DisplayState *graphic_console_init(vga_hw_update_ptr update,
> >      s->hw_update = update;
> >      s->hw_invalidate = invalidate;
> >      s->hw_screen_dump = screen_dump;
> >+    s->hw_screen_dump_async = screen_dump_async;
> >      s->hw_text_update = text_update;
> >      s->hw = opaque;
> >
> >diff --git a/console.h b/console.h
> >index c22803c..3cf28c0 100644
> >--- a/console.h
> >+++ b/console.h
> >@@ -341,17 +341,22 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
> >  typedef void (*vga_hw_update_ptr)(void *);
> >  typedef void (*vga_hw_invalidate_ptr)(void *);
> >  typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch);
> >+typedef void (*vga_hw_screen_dump_async_ptr)(void *, const char *filename,
> >+                                             bool cswitch);
> >  typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);
> >
> >  DisplayState *graphic_console_init(vga_hw_update_ptr update,
> >                                     vga_hw_invalidate_ptr invalidate,
> >                                     vga_hw_screen_dump_ptr screen_dump,
> >                                     vga_hw_text_update_ptr text_update,
> >+                                   vga_hw_screen_dump_async_ptr
> >+                                                    screen_dump_async,
> >                                     void *opaque);
> 
> 
> async in QEMU doesn't mean "generate a QMP event when you're done".
> It should mean execute this closure when you finish (function
> pointer + opaque).
> 
> The QMP event should be dispatched from the closure such that the
> screendump code doesn't have to have a direct dependency on QMP.

Yes, I can add a closure (I could put the filename there, that's the
only thing we need to have there right now).

Note that there is already a function wrapping the specific QEVENT used.

> 
> Regards,
> 
> Anthony Liguori

  reply	other threads:[~2012-03-05 15:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 14:16 [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Alon Levy
2012-03-05 14:16 ` [Qemu-devel] [PATCH v2 2/2] add qmp screendump-async Alon Levy
2012-03-05 14:33 ` [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Anthony Liguori
2012-03-05 15:17   ` Alon Levy [this message]
2012-03-05 15:56   ` [Qemu-devel] [PATCH v3 0/3] screendump async command Alon Levy
2012-03-05 15:56     ` [Qemu-devel] [PATCH v3 1/3] monitor, console: add QEVENT_SCREEN_DUMP_COMPLETE Alon Levy
2012-03-05 15:56     ` [Qemu-devel] [PATCH v3 2/3] console: add hw_screen_dump_async Alon Levy
2012-03-05 15:56     ` [Qemu-devel] [PATCH v3 3/3] add qmp screendump-async Alon Levy
2012-03-05 17:17     ` [Qemu-devel] [PATCH v3 0/3] screendump async command Anthony Liguori
2012-03-05 17:20   ` [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Avi Kivity
2012-03-05 17:27     ` Anthony Liguori
2012-03-05 17:29       ` Avi Kivity
2012-03-05 17:56         ` Luiz Capitulino
2012-03-05 18:16         ` Anthony Liguori
2012-03-05 18:22           ` Avi Kivity
2012-03-05 19:32             ` Anthony Liguori
2012-03-05 17:31       ` Luiz Capitulino
2012-03-05 18:09         ` Alon Levy
2012-03-05 18:17           ` Avi Kivity
2012-03-05 18:58             ` Alon Levy
2012-03-05 19:45               ` Luiz Capitulino
2012-03-06  7:36             ` Gerd Hoffmann
2012-03-06  7:43               ` Alon Levy
2012-03-06  7:56               ` Alon Levy
2012-03-06  8:10                 ` Gerd Hoffmann
2012-03-06  9:35                   ` Alon Levy
2012-03-06 12:24               ` Luiz Capitulino
2012-03-06 13:16                 ` Alon Levy
2012-03-06 13:51                   ` Anthony Liguori
2012-03-06 13:53                     ` Luiz Capitulino
2012-03-06 14:23                       ` Alon Levy
2012-03-06 15:07                         ` Anthony Liguori
2012-03-06 15:56                     ` Alon Levy
2012-03-06 16:02                       ` Alon Levy
2012-03-06 16:16                       ` Anthony Liguori
2012-03-06 16:26                         ` Alon Levy
2012-03-06 16:47                           ` Anthony Liguori
2012-03-07  6:57                         ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120305151703.GJ22994@garlic.tlv.redhat.com \
    --to=alevy@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).