[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv3 2/9] Add more VMSTATE_*_TEST variants for integers
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCHv3 2/9] Add more VMSTATE_*_TEST variants for integers |
Date: |
Fri, 6 Feb 2015 14:55:46 +1100 |
Currently, vmstate.h includes helper macro variants for 8, 16 and 32-bit
unsigned integers which include a "test" function which can selectively
enable or disable the field's presence in the migration stream.
There aren't similar helpers for 64-bit unsigned integers, or any size of
signed integers. This patch remedies this.
Signed-off-by: David Gibson <address@hidden>
---
include/migration/vmstate.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index fa307a6..790a55c 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -636,6 +636,18 @@ extern const VMStateInfo vmstate_info_bitmap;
#define VMSTATE_INT32_POSITIVE_LE(_f, _s) \
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
+#define VMSTATE_INT8_TEST(_f, _s, _t) \
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int8, int8_t)
+
+#define VMSTATE_INT16_TEST(_f, _s, _t) \
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int16, int16_t)
+
+#define VMSTATE_INT32_TEST(_f, _s, _t) \
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int32, int32_t)
+
+#define VMSTATE_INT64_TEST(_f, _s, _t) \
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int64, int64_t)
+
#define VMSTATE_UINT8_TEST(_f, _s, _t) \
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint8, uint8_t)
@@ -645,6 +657,9 @@ extern const VMStateInfo vmstate_info_bitmap;
#define VMSTATE_UINT32_TEST(_f, _s, _t) \
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
+#define VMSTATE_UINT64_TEST(_f, _s, _t) \
+ VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint64, uint64_t)
+
#define VMSTATE_FLOAT64_V(_f, _s, _v) \
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_float64, float64)
--
2.1.0
- [Qemu-devel] [PATCHv3 0/9] pseries: Fix and extend PAPR RTC implementation, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 2/9] Add more VMSTATE_*_TEST variants for integers,
David Gibson <=
- [Qemu-devel] [PATCHv3 6/9] pseries: Make RTAS time of day functions respect -rtc options, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 1/9] Generalize QOM publishing of date and time from mc146818rtc.c, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 5/9] pseries: Add spapr_rtc_read() helper function, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 8/9] pseries: Move rtc_offset into RTC device's state structure, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 7/9] pseries: Make the PAPR RTC a qdev device, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 3/9] pseries: Move sPAPR RTC code into its own file, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 9/9] pseries: Export RTC time via QOM, David Gibson, 2015/02/05
- [Qemu-devel] [PATCHv3 4/9] pseries: Add more parameter validation in RTAS time of day functions, David Gibson, 2015/02/05
- Re: [Qemu-devel] [Qemu-ppc] [PATCHv3 0/9] pseries: Fix and extend PAPR RTC implementation, Alexander Graf, 2015/02/09