[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v3 17/49] migration: add vmstate for int8 and ch
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [RFC PATCH v3 17/49] migration: add vmstate for int8 and char arrays |
Date: |
Thu, 31 Jul 2014 16:55:03 +0400 |
User-agent: |
StGit/0.16 |
This patch adds macros for vmstate int8 and char arrays.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
include/migration/vmstate.h | 13 +++++++++++++
vmstate.c | 6 ++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 9a001bd..2f7207b 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -143,6 +143,7 @@ extern const VMStateDescription vmstate_dummy;
#endif
extern const VMStateInfo vmstate_info_bool;
+extern const VMStateInfo vmstate_info_char;
extern const VMStateInfo vmstate_info_int8;
extern const VMStateInfo vmstate_info_int16;
@@ -694,6 +695,18 @@ extern const VMStateInfo vmstate_info_bitmap;
#define VMSTATE_UINT64_ARRAY(_f, _s, _n) \
VMSTATE_UINT64_ARRAY_V(_f, _s, _n, 0)
+#define VMSTATE_INT8_ARRAY_V(_f, _s, _n, _v) \
+ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_int8, int8_t)
+
+#define VMSTATE_INT8_ARRAY(_f, _s, _n) \
+ VMSTATE_INT8_ARRAY_V(_f, _s, _n, 0)
+
+#define VMSTATE_CHAR_ARRAY_V(_f, _s, _n, _v) \
+ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_char, char)
+
+#define VMSTATE_CHAR_ARRAY(_f, _s, _n) \
+ VMSTATE_CHAR_ARRAY_V(_f, _s, _n, 0)
+
#define VMSTATE_INT16_ARRAY_V(_f, _s, _n, _v) \
VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_int16, int16_t)
diff --git a/vmstate.c b/vmstate.c
index ef2f87b..6a7f7c2 100644
--- a/vmstate.c
+++ b/vmstate.c
@@ -286,6 +286,12 @@ const VMStateInfo vmstate_info_int8 = {
.put = put_int8,
};
+const VMStateInfo vmstate_info_char = {
+ .name = "char",
+ .get = get_int8,
+ .put = put_int8,
+};
+
/* 16 bit int */
static int get_int16(QEMUFile *f, void *pv, size_t size)
- Re: [Qemu-devel] [RFC PATCH v3 10/49] rtl8139: adding new fields to vmstate, (continued)
- [Qemu-devel] [RFC PATCH v3 11/49] piix: do not raise irq while loading vmstate, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 12/49] mc146818rtc: add missed field to vmstate, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 13/49] pl031: add missed field to vmstate, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 14/49] ide pci: reset status field before loading the vmstate, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 15/49] softmmu: fixing usage of cpu_st/ld* from helpers, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 16/49] target-i386: update fp status fix, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 17/49] migration: add vmstate for int8 and char arrays,
Pavel Dovgalyuk <=
- [Qemu-devel] [RFC PATCH v3 18/49] replay: global variables and function stubs, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 19/49] block: add suffix parameter to bdrv_open functions, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 20/49] sysemu: system functions for replay, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 21/49] replay: internal functions for replay log, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 22/49] cpu: invent instruction count for accurate replay, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 23/49] target-arm: instructions counting code for replay, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 24/49] target-i386: instructions counting code for replay, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 25/49] replay: interrupts and exceptions, Pavel Dovgalyuk, 2014/07/31
- [Qemu-devel] [RFC PATCH v3 26/49] vga: do not use virtual clock for blinking cursor, Pavel Dovgalyuk, 2014/07/31