qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays
Date: Fri, 04 May 2012 14:00:35 +0200	[thread overview]
Message-ID: <4FA3C4E3.4000108@suse.de> (raw)
In-Reply-To: <b894204df3fb4058abf165559daf19b7ffe28c62.1336128412.git.quintela@redhat.com>

Am 04.05.2012 12:54, schrieb Juan Quintela:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  savevm.c  |   25 +++++++++++++++++++++++++
>  vmstate.h |    5 +++++
>  2 files changed, 30 insertions(+), 0 deletions(-)
> 
> diff --git a/savevm.c b/savevm.c
> index 2d18bab..a22278e 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1082,6 +1082,31 @@ const VMStateInfo vmstate_info_uint16_equal = {
>      .put  = put_uint16,
>  };
> 
> +/* 32 bit float */
> +
> +static int get_float32(QEMUFile *f, void *pv, size_t size)
> +{
> +    float32 *v = pv;
> +    uint32_t u;
> +    qemu_get_be32s(f, &u);
> +    *v = make_float32(u);
> +    return 0;
> +}
> +
> +static void put_float32(QEMUFile *f, void *pv, size_t size)
> +{
> +    float32 *v = pv;
> +    uint32_t u;
> +    u = float32_val(*v);
> +    qemu_put_be32s(f, &u);
> +}
> +
> +const VMStateInfo vmstate_info_float32 = {
> +    .name = "float32",
> +    .get  = get_float32,
> +    .put  = put_float32,
> +};
> +
>  /* timers  */
> 
>  static int get_timer(QEMUFile *f, void *pv, size_t size)
> diff --git a/vmstate.h b/vmstate.h
> index 1a4a60b..135c5aa 100644
> --- a/vmstate.h
> +++ b/vmstate.h
> @@ -130,6 +130,8 @@ extern const VMStateInfo vmstate_info_uint16;
>  extern const VMStateInfo vmstate_info_uint32;
>  extern const VMStateInfo vmstate_info_uint64;
> 
> +extern const VMStateInfo vmstate_info_float32;
> +
>  extern const VMStateInfo vmstate_info_timer;
>  extern const VMStateInfo vmstate_info_buffer;
>  extern const VMStateInfo vmstate_info_unused_buffer;
> @@ -559,6 +561,9 @@ extern const VMStateDescription vmstate_cpu;
>  #define VMSTATE_INT64_ARRAY(_f, _s, _n)                               \
>      VMSTATE_INT64_ARRAY_V(_f, _s, _n, 0)
> 
> +#define VMSTATE_FLOAT32_ARRAY(_f, _s, _n)                             \
> +    VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float32, float32)

Why isn't there a VMSTATE_FLOAT32_ARRAY_V for symmetry? Otherwise looks
fine.

/-F

> +
>  #define VMSTATE_BUFFER_V(_f, _s, _v)                                  \
>      VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
> 

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-05-04 12:01 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 10:54 [Qemu-devel] [PATCH v5 00/35] VMState port of all cpus Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION Juan Quintela
2012-05-04 11:46   ` Andreas Färber
2012-05-04 11:59     ` Juan Quintela
2012-05-04 12:06       ` Andreas Färber
2012-05-04 10:54 ` [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's Juan Quintela
2012-05-04 16:16   ` Andreas Färber
2012-05-07 17:14     ` Andreas Färber
2012-05-04 10:54 ` [Qemu-devel] [PATCH 03/35] vmstate: unicore32 don't support cpu migration Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 04/35] vmstate: use new cpu style for x86 Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 05/35] vmstate: use new style for lm32 cpus Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 06/35] vmstate: make microblaze cpus not migrateable Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 07/35] vmstate: port cris cpu to vmstate Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays Juan Quintela
2012-05-04 12:00   ` Andreas Färber [this message]
2012-05-04 10:54 ` [Qemu-devel] [PATCH 09/35] vmstate: introduce float64 arrays Juan Quintela
2012-05-04 13:03   ` Andreas Färber
2012-05-04 10:54 ` [Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 12/35] vmstate: port ppc cpu Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 13/35] vmstate: introduce VMSTATE_VARRAY_MULTIPLY Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 14/35] vmstate: define vmstate_info_uinttls Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 15/35] vmstate: port sparc cpu Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc Juan Quintela
2012-05-04 11:35   ` Andreas Färber
2012-05-04 13:00     ` Peter Maydell
2012-05-04 13:19       ` Andreas Färber
2012-05-06  8:59   ` Blue Swirl
2012-05-04 10:54 ` [Qemu-devel] [PATCH 17/35] mips_fulong2e: cpu vmstate already registered in cpu_exec_init Juan Quintela
2012-05-13 18:12   ` Andreas Färber
2012-05-04 10:54 ` [Qemu-devel] [PATCH 18/35] mips: make mvp an embedded struct instead of a pointer Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 19/35] mips: make tlb " Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 20/35] mips: bump migration version to 4 Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 21/35] vmstate: port mips cpu Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 22/35] arm: save always 32 fpu registers Juan Quintela
2012-05-04 12:44   ` Peter Maydell
2012-05-04 10:54 ` [Qemu-devel] [PATCH 23/35] vmstate: port arm cpu Juan Quintela
2012-05-04 13:04   ` Peter Maydell
2012-05-04 15:28     ` Juan Quintela
2012-05-04 15:37       ` Peter Maydell
2012-05-04 10:54 ` [Qemu-devel] [PATCH 24/35] vmstate: all cpus converted Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 25/35] vmstate: fix vmstate formating for i386 Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 26/35] vmstate: remove unneeded includes from target-*/machine.c Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 27/35] vmstate: rename machine.c to vmstate-cpu.c Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 28/35] vmstate: Add copyright info for alpha processor Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 29/35] vmstate: Add copyright info for lm32 processor Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 30/35] vmstate: Add copyright info for cris processor Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 31/35] vmstate: Add copyright info for arm processor Juan Quintela
2012-05-04 10:54 ` [Qemu-devel] [PATCH 32/35] vmstate: Add copyright info for i386 processor Juan Quintela
2012-05-04 10:55 ` [Qemu-devel] [PATCH 33/35] vmstate: Add copyright info for mips processor Juan Quintela
2012-05-04 10:55 ` [Qemu-devel] [PATCH 34/35] vmstate: Add copyright info for ppc processor Juan Quintela
2012-05-04 10:55 ` [Qemu-devel] [PATCH 35/35] vmstate: Add copyright info for sparc processor Juan Quintela
2012-05-04 11:19 ` [Qemu-devel] [PATCH v5 00/35] VMState port of all cpus Andreas Färber
2012-05-04 11:34   ` Juan Quintela
2012-05-04 11:35     ` Juan Quintela
2012-05-04 12:56       ` Anthony Liguori

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=4FA3C4E3.4000108@suse.de \
    --to=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 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).