qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] QMP: Introduce RESUME event
Date: Mon, 03 May 2010 13:06:22 -0500	[thread overview]
Message-ID: <4BDF109E.7090206@codemonkey.ws> (raw)
In-Reply-To: <20100427203559.3db863e1@redhat.com>

On 04/27/2010 06:35 PM, Luiz Capitulino wrote:
> It's emitted when the Virtual Machine resumes execution.
>
> We currently have the STOP event but don't have the matching
> RESUME one, this means that clients are notified when the VM
> is stopped but don't get anything when it resumes.
>
> Let's fix that as it's already causing some trouble to libvirt.
>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   QMP/qmp-events.txt |   12 ++++++++++++
>   monitor.c          |    3 +++
>   monitor.h          |    1 +
>   vl.c               |    1 +
>   4 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
> index c084a47..01ec85f 100644
> --- a/QMP/qmp-events.txt
> +++ b/QMP/qmp-events.txt
> @@ -38,6 +38,18 @@ Example:
>   { "event": "RESET",
>       "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
>
> +RESUME
> +------
> +
> +Emitted when the Virtual Machine resumes execution.
> +
> +Data: None.
> +
> +Example:
> +
> +{ "event": "RESUME",
> +    "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
> +
>   RTC_CHANGE
>   ----------
>
> diff --git a/monitor.c b/monitor.c
> index 754bcc5..bb87479 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -423,6 +423,9 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
>           case QEVENT_STOP:
>               event_name = "STOP";
>               break;
> +        case QEVENT_RESUME:
> +            event_name = "RESUME";
> +            break;
>           case QEVENT_VNC_CONNECTED:
>               event_name = "VNC_CONNECTED";
>               break;
> diff --git a/monitor.h b/monitor.h
> index 5bdeed1..ea15469 100644
> --- a/monitor.h
> +++ b/monitor.h
> @@ -21,6 +21,7 @@ typedef enum MonitorEvent {
>       QEVENT_RESET,
>       QEVENT_POWERDOWN,
>       QEVENT_STOP,
> +    QEVENT_RESUME,
>       QEVENT_VNC_CONNECTED,
>       QEVENT_VNC_INITIALIZED,
>       QEVENT_VNC_DISCONNECTED,
> diff --git a/vl.c b/vl.c
> index a485c58..6dfbf07 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1679,6 +1679,7 @@ void vm_start(void)
>           vm_running = 1;
>           vm_state_notify(1, 0);
>           resume_all_vcpus();
> +        monitor_protocol_event(QEVENT_RESUME, NULL);
>       }
>   }
>
>    

      reply	other threads:[~2010-05-03 18:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 23:35 [Qemu-devel] [PATCH] QMP: Introduce RESUME event Luiz Capitulino
2010-05-03 18:06 ` Anthony Liguori [this message]

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=4BDF109E.7090206@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --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).