All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: fred.konrad@greensocs.com
Cc: peter.maydell@linaro.org, mark.burton@greensocs.com,
	qemu-devel@nongnu.org, dgilbert@redhat.com, amit.shah@redhat.com,
	pbonzini@redhat.com, vilanova@ac.upc.edu
Subject: Re: [Qemu-devel] [RFC PATCH v4 02/13] migration: migrate icount fields.
Date: Wed, 25 Jun 2014 14:17:31 +0200	[thread overview]
Message-ID: <87wqc5yyhw.fsf@troll.troll> (raw)
In-Reply-To: <1403684808-23248-3-git-send-email-fred.konrad@greensocs.com> (fred konrad's message of "Wed, 25 Jun 2014 10:26:37 +0200")

fred.konrad@greensocs.com wrote:
> From: KONRAD Frederic <fred.konrad@greensocs.com>
>
> This fixes a bug where qemu_icount and qemu_icount_bias are not migrated.
> It adds a subsection "timer/icount" to vmstate_timers so icount is migrated only
> when needed.
>
> Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
> Reviewed-by: Amit Shah <amit.shah@redhat.com>
> ---
>  cpus.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/cpus.c b/cpus.c
> index 127de1c..8d2ddf0 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -429,6 +429,26 @@ void qemu_clock_warp(QEMUClockType type)
>      }
>  }
>  
> +static bool icount_state_needed(void *opaque)
> +{
> +    return use_icount;
> +}
> +
> +/*
> + * This is a subsection for icount migration.
> + */
> +static const VMStateDescription icount_vmstate_timers = {
> +    .name = "timer/icount",
> +    .version_id = 1,
> +    .minimum_version_id = 1,
> +    .minimum_version_id_old = 1,

Drop this line, not needed anymore.

> +    .fields      = (VMStateField[]) {

Remove spaces

> +        VMSTATE_INT64(qemu_icount_bias, TimersState),
> +        VMSTATE_INT64(qemu_icount, TimersState),
> +        VMSTATE_END_OF_LIST()
> +    }
> +};
> +
>  static const VMStateDescription vmstate_timers = {
>      .name = "timer",
>      .version_id = 2,
> @@ -438,6 +458,14 @@ static const VMStateDescription vmstate_timers = {
>          VMSTATE_INT64(dummy, TimersState),
>          VMSTATE_INT64_V(cpu_clock_offset, TimersState, 2),
>          VMSTATE_END_OF_LIST()
> +    },
> +    .subsections = (VMStateSubsection[]) {
> +        {
> +            .vmsd = &icount_vmstate_timers,
> +            .needed = icount_state_needed,
> +        }, {
> +            /* empty */
> +        }
>      }
>  };

Rest is ok.

Thanks, Juan.

  reply	other threads:[~2014-06-25 12:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25  8:26 [Qemu-devel] [RFC PATCH v4 00/13] Reverse execution fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 01/13] icount: put icount variables into TimerState fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 02/13] migration: migrate icount fields fred.konrad
2014-06-25 12:17   ` Juan Quintela [this message]
2014-06-25 15:17     ` Frederic Konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 03/13] migration: make qemu_savevm_state public fred.konrad
2014-06-25 12:18   ` Juan Quintela
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 04/13] icount: introduce icount timer fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 05/13] icount: check for icount clock deadline when cpu loop exits fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 06/13] icount: make icount extra computed on icount clock as well fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 07/13] timer: add cpu_icount_to_ns function fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 08/13] trace-events: add reverse-execution events fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 09/13] introduce reverse execution mechanism fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 10/13] gdbstub: allow reverse execution in gdb stub fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 11/13] cpu-exec: trigger a debug request when rexec stops fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 12/13] cexe: synchronize icount on the next event fred.konrad
2014-06-25  8:26 ` [Qemu-devel] [RFC PATCH v4 13/13] cexe: allow to enable reverse execution fred.konrad

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=87wqc5yyhw.fsf@troll.troll \
    --to=quintela@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.