[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/36] vmstate: introduce CPU_DoubleU arrays
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 11/36] vmstate: introduce CPU_DoubleU arrays |
Date: |
Mon, 19 Mar 2012 23:57:39 +0100 |
Signed-off-by: Juan Quintela <address@hidden>
---
savevm.c | 24 ++++++++++++++++++++++++
vmstate.h | 4 ++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/savevm.c b/savevm.c
index 822f078..4c42076 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1142,6 +1142,30 @@ const VMStateInfo vmstate_info_float64 = {
.put = put_float64,
};
+/* 64 bit CPUDouble */
+
+static int get_cpudouble(QEMUFile *f, void *pv, size_t size)
+{
+ CPU_DoubleU *v = pv;
+
+ qemu_get_be32s(f, &v->l.upper);
+ qemu_get_be32s(f, &v->l.lower);
+ return 0;
+}
+
+static void put_cpudouble(QEMUFile *f, void *pv, size_t size)
+{
+ CPU_DoubleU *v = pv;
+ qemu_put_be32s(f, &v->l.upper);
+ qemu_put_be32s(f, &v->l.lower);
+}
+
+const VMStateInfo vmstate_info_cpudouble = {
+ .name = "CPU_Double_U",
+ .get = get_cpudouble,
+ .put = put_cpudouble,
+};
+
/* timers */
static int get_timer(QEMUFile *f, void *pv, size_t size)
diff --git a/vmstate.h b/vmstate.h
index d3fb88c..5c56f25 100644
--- a/vmstate.h
+++ b/vmstate.h
@@ -132,6 +132,7 @@ extern const VMStateInfo vmstate_info_uint64;
extern const VMStateInfo vmstate_info_float32;
extern const VMStateInfo vmstate_info_float64;
+extern const VMStateInfo vmstate_info_cpudouble;
extern const VMStateInfo vmstate_info_timer;
extern const VMStateInfo vmstate_info_buffer;
@@ -568,6 +569,9 @@ extern const VMStateDescription vmstate_cpu;
#define VMSTATE_FLOAT64_ARRAY(_f, _s, _n) \
VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float64, float64)
+#define VMSTATE_CPUDOUBLE_ARRAY(_f, _s, _n) \
+ VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_cpudouble, CPU_DoubleU)
+
#define VMSTATE_BUFFER_V(_f, _s, _v) \
VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
--
1.7.7.6
- Re: [Qemu-devel] [PATCH 08/36] vmstate: machine.c is only compiled for !CONFIG_USER_ONLY, (continued)
- [Qemu-devel] [PATCH 14/36] vmstate: introduce VMSTATE_VARRAY_MULTIPLY, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 03/36] vmstate: unicore32 don't support cpu migration, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 15/36] vmstate: define vmstate_info_uinttls, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 18/36] mips_fulong2e: cpu vmstate already registered in cpu_exec_init, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 07/36] vmstate: port cris cpu to vmstate, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 19/36] mips: make mvp an embedded struct instead of a pointer, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 11/36] vmstate: introduce CPU_DoubleU arrays,
Juan Quintela <=
- [Qemu-devel] [PATCH 06/36] vmstate: make microblaze cpus not migrateable, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 16/36] vmstate: port sparc cpu, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 27/36] vmstate: remove unneeded includes from target-*/machine.c, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 26/36] vmstate: fix vmstate formating for i386, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 01/36] vmstate: Simplify test for CPU_SAVE_VERSION, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 22/36] vmstate: port mips cpu, Juan Quintela, 2012/03/19
- [Qemu-devel] [PATCH 21/36] mips: bump migration version to 4, Juan Quintela, 2012/03/19