All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Guang <lig.fnst@cn.fujitsu.com>
To: liguang <lig.fnst@cn.fujitsu.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Juan Quintela" <quintela@redhat.com>,
	qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v11 1/5] vmstate: add VMSTATE_PTIMER_ARRAY
Date: Thu, 12 Dec 2013 16:59:34 +0800	[thread overview]
Message-ID: <52A97AF6.8070707@cn.fujitsu.com> (raw)
In-Reply-To: <1386749341-9843-2-git-send-email-lig.fnst@cn.fujitsu.com>

ping ...
this patch is not changed since v8,
can it get some comments?

Thanks!

liguang wrote:
> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
> ---
>   include/migration/vmstate.h |    4 ++++
>   savevm.c                    |   31 +++++++++++++++++++++++++++++++
>   2 files changed, 35 insertions(+), 0 deletions(-)
>
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index 9d09e60..f5d6e81 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -165,6 +165,7 @@ extern const VMStateInfo vmstate_info_timer;
>   extern const VMStateInfo vmstate_info_buffer;
>   extern const VMStateInfo vmstate_info_unused_buffer;
>   extern const VMStateInfo vmstate_info_bitmap;
> +extern const VMStateInfo vmstate_info_ptimer;
>
>   #define type_check_2darray(t1,t2,n,m) ((t1(*)[n][m])0 - (t2*)0)
>   #define type_check_array(t1,t2,n) ((t1(*)[n])0 - (t2*)0)
> @@ -613,6 +614,9 @@ extern const VMStateInfo vmstate_info_bitmap;
>   #define VMSTATE_TIMER_ARRAY(_f, _s, _n)                              \
>       VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer *)
>
> +#define VMSTATE_PTIMER_ARRAY(_f, _s, _n)                             \
> +    VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_ptimer, ptimer_state*)
> +
>   #define VMSTATE_BOOL_ARRAY_V(_f, _s, _n, _v)                         \
>       VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_bool, bool)
>
> diff --git a/savevm.c b/savevm.c
> index 2f631d4..54dbb33 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -30,6 +30,7 @@
>   #include "monitor/monitor.h"
>   #include "sysemu/sysemu.h"
>   #include "qemu/timer.h"
> +#include "hw/ptimer.h"
>   #include "audio/audio.h"
>   #include "migration/migration.h"
>   #include "qemu/sockets.h"
> @@ -1362,6 +1363,36 @@ const VMStateInfo vmstate_info_timer = {
>       .put  = put_timer,
>   };
>
> +static int get_ptimer(QEMUFile *f, void *pv, size_t size)
> +{
> +    ptimer_state *v = pv;
> +    uint64_t count;
> +
> +    count = qemu_get_be64(f);
> +    if (count != -1) {
> +        ptimer_set_count(v, count);
> +    } else {
> +        ptimer_stop(v);
> +    }
> +
> +    return 0;
> +}
> +
> +static void put_ptimer(QEMUFile *f, void *pv, size_t size)
> +{
> +    ptimer_state *v = pv;
> +    uint64_t count;
> +
> +    count = ptimer_get_count(v);
> +    qemu_put_be64(f, count);
> +}
> +
> +const VMStateInfo vmstate_info_ptimer = {
> +    .name = "ptimer",
> +    .get  = get_ptimer,
> +    .put  = put_ptimer,
> +};
> +
>   /* uint8_t buffers */
>
>   static int get_buffer(QEMUFile *f, void *pv, size_t size)
>    

  reply	other threads:[~2013-12-12  9:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11  8:08 [Qemu-devel] [PATCH v11 0/5] add allwinner A10 SoC support liguang
2013-12-11  8:08 ` [Qemu-devel] [PATCH v11 1/5] vmstate: add VMSTATE_PTIMER_ARRAY liguang
2013-12-12  8:59   ` Li Guang [this message]
2013-12-12 19:57   ` Peter Maydell
2013-12-13  0:43     ` Li Guang
2013-12-11  8:08 ` [Qemu-devel] [PATCH v11 2/5] hw/timer: add allwinner a10 timer liguang
2013-12-11  8:08 ` [Qemu-devel] [PATCH v11 3/5] hw/intc: add allwinner A10 interrupt controller liguang
2013-12-11  8:27   ` Peter Crosthwaite
2013-12-12 19:09     ` Peter Maydell
2013-12-12 19:11   ` Peter Maydell
2013-12-13  0:43     ` Li Guang
2013-12-11  8:09 ` [Qemu-devel] [PATCH v11 4/5] hw/arm: add allwinner a10 SoC support liguang
2013-12-11  8:09 ` [Qemu-devel] [PATCH v11 5/5] hw/arm: add cubieboard support liguang

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=52A97AF6.8070707@cn.fujitsu.com \
    --to=lig.fnst@cn.fujitsu.com \
    --cc=afaerber@suse.de \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    /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.