* [Qemu-devel] [PATCH 0/9] VMState infrastructure
@ 2011-03-10 11:33 Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 1/9] vmstate: add VMSTATE_UINT32_EQUAL Juan Quintela
` (10 more replies)
0 siblings, 11 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Hi
This is the infrastructure that I pushed on my previous series.
Anthony don't like 58 patches series (why? O:-) And then split the
series in three.
This are the infrastructure patches needed for the other two series.
Anthony, please apply.
Later, Juan.
Juan Quintela (9):
vmstate: add VMSTATE_UINT32_EQUAL
vmstate: Fix varrays with uint8 indexes
vmstate: add UINT32 VARRAYS
vmstate: add VMSTATE_STRUCT_VARRAY_INT32
vmstate: add VMSTATE_INT64_ARRAY
vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
vmstate: Add a way to send a partial array
vmstate: be able to store/save a pci device from a pointer
vmstate: move timers to use test instead of version
hw/hw.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
savevm.c | 25 ++++++++++++++++++++
2 files changed, 98 insertions(+), 5 deletions(-)
--
1.7.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 1/9] vmstate: add VMSTATE_UINT32_EQUAL
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes Juan Quintela
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 4 ++++
savevm.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 4e2d592..0299207 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -343,6 +343,7 @@ extern const VMStateInfo vmstate_info_int64;
extern const VMStateInfo vmstate_info_uint8_equal;
extern const VMStateInfo vmstate_info_uint16_equal;
extern const VMStateInfo vmstate_info_int32_equal;
+extern const VMStateInfo vmstate_info_uint32_equal;
extern const VMStateInfo vmstate_info_int32_le;
extern const VMStateInfo vmstate_info_uint8;
@@ -704,6 +705,9 @@ extern const VMStateDescription vmstate_usb_device;
#define VMSTATE_INT32_EQUAL(_f, _s) \
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_equal, int32_t)
+#define VMSTATE_UINT32_EQUAL(_f, _s) \
+ VMSTATE_SINGLE(_f, _s, 0, vmstate_info_uint32_equal, uint32_t)
+
#define VMSTATE_INT32_LE(_f, _s) \
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
diff --git a/savevm.c b/savevm.c
index a50fd31..ce063d1 100644
--- a/savevm.c
+++ b/savevm.c
@@ -882,6 +882,27 @@ const VMStateInfo vmstate_info_uint32 = {
.put = put_uint32,
};
+/* 32 bit uint. See that the received value is the same than the one
+ in the field */
+
+static int get_uint32_equal(QEMUFile *f, void *pv, size_t size)
+{
+ uint32_t *v = pv;
+ uint32_t v2;
+ qemu_get_be32s(f, &v2);
+
+ if (*v == v2) {
+ return 0;
+ }
+ return -EINVAL;
+}
+
+const VMStateInfo vmstate_info_uint32_equal = {
+ .name = "uint32 equal",
+ .get = get_uint32_equal,
+ .put = put_uint32,
+};
+
/* 64 bit unsigned int */
static int get_uint64(QEMUFile *f, void *pv, size_t size)
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 1/9] vmstate: add VMSTATE_UINT32_EQUAL Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-18 10:34 ` Yoshiaki Tamura
2011-03-10 11:33 ` [Qemu-devel] [PATCH 3/9] vmstate: add UINT32 VARRAYS Juan Quintela
` (8 subsequent siblings)
10 siblings, 1 reply; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 5 +++--
savevm.c | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 0299207..40c6396 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -298,6 +298,7 @@ enum VMStateFlags {
VMS_VARRAY_UINT16 = 0x080, /* Array with size in uint16_t field */
VMS_VBUFFER = 0x100, /* Buffer with size in int32_t field */
VMS_MULTIPLY = 0x200, /* multiply "size" field by field_size */
+ VMS_VARRAY_UINT8 = 0x400, /* Array with size in uint8_t field*/
};
typedef struct {
@@ -489,11 +490,11 @@ extern const VMStateInfo vmstate_info_unused_buffer;
#define VMSTATE_STRUCT_VARRAY_UINT8(_field, _state, _field_num, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
- .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
+ .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
.version_id = (_version), \
.vmsd = &(_vmsd), \
.size = sizeof(_type), \
- .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
+ .flags = VMS_STRUCT|VMS_VARRAY_UINT8, \
.offset = offsetof(_state, _field), \
}
diff --git a/savevm.c b/savevm.c
index ce063d1..4db036b 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1331,6 +1331,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
n_elems = *(int32_t *)(opaque+field->num_offset);
} else if (field->flags & VMS_VARRAY_UINT16) {
n_elems = *(uint16_t *)(opaque+field->num_offset);
+ } else if (field->flags & VMS_VARRAY_UINT8) {
+ n_elems = *(uint8_t *)(opaque+field->num_offset);
}
if (field->flags & VMS_POINTER) {
base_addr = *(void **)base_addr + field->start;
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 3/9] vmstate: add UINT32 VARRAYS
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 1/9] vmstate: add VMSTATE_UINT32_EQUAL Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 4/9] vmstate: add VMSTATE_STRUCT_VARRAY_INT32 Juan Quintela
` (7 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 11 +++++++++++
savevm.c | 2 ++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 40c6396..6e78fa9 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -299,6 +299,7 @@ enum VMStateFlags {
VMS_VBUFFER = 0x100, /* Buffer with size in int32_t field */
VMS_MULTIPLY = 0x200, /* multiply "size" field by field_size */
VMS_VARRAY_UINT8 = 0x400, /* Array with size in uint8_t field*/
+ VMS_VARRAY_UINT32 = 0x800, /* Array with size in uint32_t field*/
};
typedef struct {
@@ -438,6 +439,16 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_pointer(_state, _field, _type), \
}
+#define VMSTATE_VARRAY_UINT32(_field, _state, _field_num, _version, _info, _type) {\
+ .name = (stringify(_field)), \
+ .version_id = (_version), \
+ .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\
+ .info = &(_info), \
+ .size = sizeof(_type), \
+ .flags = VMS_VARRAY_UINT32|VMS_POINTER, \
+ .offset = vmstate_offset_pointer(_state, _field, _type), \
+}
+
#define VMSTATE_VARRAY_UINT16_UNSAFE(_field, _state, _field_num, _version, _info, _type) {\
.name = (stringify(_field)), \
.version_id = (_version), \
diff --git a/savevm.c b/savevm.c
index 4db036b..60d2f2a 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1329,6 +1329,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
n_elems = field->num;
} else if (field->flags & VMS_VARRAY_INT32) {
n_elems = *(int32_t *)(opaque+field->num_offset);
+ } else if (field->flags & VMS_VARRAY_UINT32) {
+ n_elems = *(uint32_t *)(opaque+field->num_offset);
} else if (field->flags & VMS_VARRAY_UINT16) {
n_elems = *(uint16_t *)(opaque+field->num_offset);
} else if (field->flags & VMS_VARRAY_UINT8) {
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 4/9] vmstate: add VMSTATE_STRUCT_VARRAY_INT32
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (2 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 3/9] vmstate: add UINT32 VARRAYS Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 5/9] vmstate: add VMSTATE_INT64_ARRAY Juan Quintela
` (6 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 6e78fa9..0ed63c5 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -529,6 +529,16 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_pointer(_state, _field, _type), \
}
+#define VMSTATE_STRUCT_VARRAY_INT32(_field, _state, _field_num, _version, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_STATIC_BUFFER(_field, _state, _version, _test, _start, _size) { \
.name = (stringify(_field)), \
.version_id = (_version), \
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 5/9] vmstate: add VMSTATE_INT64_ARRAY
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (3 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 4/9] vmstate: add VMSTATE_STRUCT_VARRAY_INT32 Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_STRUCT_VARRAY_UINT32 Juan Quintela
` (5 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 0ed63c5..d801694 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -802,6 +802,12 @@ extern const VMStateDescription vmstate_usb_device;
#define VMSTATE_UINT32_ARRAY(_f, _s, _n) \
VMSTATE_UINT32_ARRAY_V(_f, _s, _n, 0)
+#define VMSTATE_INT64_ARRAY_V(_f, _s, _n, _v) \
+ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_int64, int64_t)
+
+#define VMSTATE_INT64_ARRAY(_f, _s, _n) \
+ VMSTATE_INT64_ARRAY_V(_f, _s, _n, 0)
+
#define VMSTATE_BUFFER_V(_f, _s, _v) \
VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (4 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 5/9] vmstate: add VMSTATE_INT64_ARRAY Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 7/9] vmstate: Add a way to send a partial array Juan Quintela
` (4 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index d801694..c198ce8 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -539,6 +539,16 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = offsetof(_state, _field), \
}
+#define VMSTATE_STRUCT_VARRAY_UINT32(_field, _state, _field_num, _version, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .num_offset = vmstate_offset_value(_state, _field_num, uint32_t), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_VARRAY_UINT32, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_STATIC_BUFFER(_field, _state, _version, _test, _start, _size) { \
.name = (stringify(_field)), \
.version_id = (_version), \
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 7/9] vmstate: Add a way to send a partial array
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (5 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_STRUCT_VARRAY_UINT32 Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 8/9] vmstate: be able to store/save a pci device from a pointer Juan Quintela
` (3 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index c198ce8..9df1c2c 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -429,6 +429,15 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_sub_array(_state, _field, _type, _start), \
}
+#define VMSTATE_ARRAY_INT32_UNSAFE(_field, _state, _field_num, _info, _type) {\
+ .name = (stringify(_field)), \
+ .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \
+ .info = &(_info), \
+ .size = sizeof(_type), \
+ .flags = VMS_VARRAY_INT32, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_VARRAY_INT32(_field, _state, _field_num, _version, _info, _type) {\
.name = (stringify(_field)), \
.version_id = (_version), \
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 8/9] vmstate: be able to store/save a pci device from a pointer
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (6 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 7/9] vmstate: Add a way to send a partial array Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 9/9] vmstate: move timers to use test instead of version Juan Quintela
` (2 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 9df1c2c..4e09f18 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -629,6 +629,14 @@ extern const VMStateDescription vmstate_pci_device;
.offset = vmstate_offset_value(_state, _field, PCIDevice), \
}
+#define VMSTATE_PCI_DEVICE_POINTER(_field, _state) { \
+ .name = (stringify(_field)), \
+ .size = sizeof(PCIDevice), \
+ .vmsd = &vmstate_pci_device, \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = vmstate_offset_pointer(_state, _field, PCIDevice), \
+}
+
extern const VMStateDescription vmstate_pcie_device;
#define VMSTATE_PCIE_DEVICE(_field, _state) { \
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH 9/9] vmstate: move timers to use test instead of version
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (7 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 8/9] vmstate: be able to store/save a pci device from a pointer Juan Quintela
@ 2011-03-10 11:33 ` Juan Quintela
2011-03-10 13:56 ` [Qemu-devel] [PATCH 0/9] VMState infrastructure Anthony Liguori
2011-03-10 23:18 ` Anthony Liguori
10 siblings, 0 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-10 11:33 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/hw.h | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 4e09f18..1b09039 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -399,6 +399,15 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_value(_state, _field, _type), \
}
+#define VMSTATE_POINTER_TEST(_field, _state, _test, _info, _type) { \
+ .name = (stringify(_field)), \
+ .info = &(_info), \
+ .field_exists = (_test), \
+ .size = sizeof(_type), \
+ .flags = VMS_SINGLE|VMS_POINTER, \
+ .offset = vmstate_offset_value(_state, _field, _type), \
+}
+
#define VMSTATE_ARRAY(_field, _state, _num, _version, _info, _type) {\
.name = (stringify(_field)), \
.version_id = (_version), \
@@ -766,11 +775,11 @@ extern const VMStateDescription vmstate_usb_device;
#define VMSTATE_UINT32_TEST(_f, _s, _t) \
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
-#define VMSTATE_TIMER_V(_f, _s, _v) \
- VMSTATE_POINTER(_f, _s, _v, vmstate_info_timer, QEMUTimer *)
+#define VMSTATE_TIMER_TEST(_f, _s, _test) \
+ VMSTATE_POINTER_TEST(_f, _s, _test, vmstate_info_timer, QEMUTimer *)
#define VMSTATE_TIMER(_f, _s) \
- VMSTATE_TIMER_V(_f, _s, 0)
+ VMSTATE_TIMER_TEST(_f, _s, NULL)
#define VMSTATE_TIMER_ARRAY(_f, _s, _n) \
VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer *)
--
1.7.4
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] VMState infrastructure
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (8 preceding siblings ...)
2011-03-10 11:33 ` [Qemu-devel] [PATCH 9/9] vmstate: move timers to use test instead of version Juan Quintela
@ 2011-03-10 13:56 ` Anthony Liguori
2011-03-10 23:18 ` Anthony Liguori
10 siblings, 0 replies; 16+ messages in thread
From: Anthony Liguori @ 2011-03-10 13:56 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On 03/10/2011 05:33 AM, Juan Quintela wrote:
> Hi
>
> This is the infrastructure that I pushed on my previous series.
> Anthony don't like 58 patches series (why? O:-) And then split the
> series in three.
Yeah, my intention was that you not send all series at once though :-)
At any rate this series looks good.
Regards,
Anthony Liguori
> This are the infrastructure patches needed for the other two series.
>
> Anthony, please apply.
>
> Later, Juan.
>
> Juan Quintela (9):
> vmstate: add VMSTATE_UINT32_EQUAL
> vmstate: Fix varrays with uint8 indexes
> vmstate: add UINT32 VARRAYS
> vmstate: add VMSTATE_STRUCT_VARRAY_INT32
> vmstate: add VMSTATE_INT64_ARRAY
> vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
> vmstate: Add a way to send a partial array
> vmstate: be able to store/save a pci device from a pointer
> vmstate: move timers to use test instead of version
>
> hw/hw.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
> savevm.c | 25 ++++++++++++++++++++
> 2 files changed, 98 insertions(+), 5 deletions(-)
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] VMState infrastructure
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
` (9 preceding siblings ...)
2011-03-10 13:56 ` [Qemu-devel] [PATCH 0/9] VMState infrastructure Anthony Liguori
@ 2011-03-10 23:18 ` Anthony Liguori
10 siblings, 0 replies; 16+ messages in thread
From: Anthony Liguori @ 2011-03-10 23:18 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On 03/10/2011 05:33 AM, Juan Quintela wrote:
> Hi
>
> This is the infrastructure that I pushed on my previous series.
> Anthony don't like 58 patches series (why? O:-) And then split the
> series in three.
>
> This are the infrastructure patches needed for the other two series.
>
> Anthony, please apply.
Applied. Thanks.
Regards,
Anthony Liguori
> Later, Juan.
>
> Juan Quintela (9):
> vmstate: add VMSTATE_UINT32_EQUAL
> vmstate: Fix varrays with uint8 indexes
> vmstate: add UINT32 VARRAYS
> vmstate: add VMSTATE_STRUCT_VARRAY_INT32
> vmstate: add VMSTATE_INT64_ARRAY
> vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
> vmstate: Add a way to send a partial array
> vmstate: be able to store/save a pci device from a pointer
> vmstate: move timers to use test instead of version
>
> hw/hw.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
> savevm.c | 25 ++++++++++++++++++++
> 2 files changed, 98 insertions(+), 5 deletions(-)
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes
2011-03-10 11:33 ` [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes Juan Quintela
@ 2011-03-18 10:34 ` Yoshiaki Tamura
2011-03-18 12:04 ` [Qemu-devel] " Juan Quintela
0 siblings, 1 reply; 16+ messages in thread
From: Yoshiaki Tamura @ 2011-03-18 10:34 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
Juan, Anthony,
It seems this patch broke live migration in my environment. The guest
hangs after switching to remote. The following is parameters of the
guest.
-L /usr/local/seabios --enable-kvm -M pc -m 512 -smp 1 -monitor stdio
-localtime -boot c -drive file=/vm/fedora13.img,if=virtio -net
nic,macaddr=54:52:00:47:a5:a8,model=virtio -net tap -parallel none
-usb -vnc :0
Have you seen similar issues?
Thanks,
Yoshi
2011/3/10 Juan Quintela <quintela@redhat.com>:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> hw/hw.h | 5 +++--
> savevm.c | 2 ++
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/hw.h b/hw/hw.h
> index 0299207..40c6396 100644
> --- a/hw/hw.h
> +++ b/hw/hw.h
> @@ -298,6 +298,7 @@ enum VMStateFlags {
> VMS_VARRAY_UINT16 = 0x080, /* Array with size in uint16_t field */
> VMS_VBUFFER = 0x100, /* Buffer with size in int32_t field */
> VMS_MULTIPLY = 0x200, /* multiply "size" field by field_size */
> + VMS_VARRAY_UINT8 = 0x400, /* Array with size in uint8_t field*/
> };
>
> typedef struct {
> @@ -489,11 +490,11 @@ extern const VMStateInfo vmstate_info_unused_buffer;
>
> #define VMSTATE_STRUCT_VARRAY_UINT8(_field, _state, _field_num, _version, _vmsd, _type) { \
> .name = (stringify(_field)), \
> - .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
> + .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
> .version_id = (_version), \
> .vmsd = &(_vmsd), \
> .size = sizeof(_type), \
> - .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
> + .flags = VMS_STRUCT|VMS_VARRAY_UINT8, \
> .offset = offsetof(_state, _field), \
> }
>
> diff --git a/savevm.c b/savevm.c
> index ce063d1..4db036b 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1331,6 +1331,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
> n_elems = *(int32_t *)(opaque+field->num_offset);
> } else if (field->flags & VMS_VARRAY_UINT16) {
> n_elems = *(uint16_t *)(opaque+field->num_offset);
> + } else if (field->flags & VMS_VARRAY_UINT8) {
> + n_elems = *(uint8_t *)(opaque+field->num_offset);
> }
> if (field->flags & VMS_POINTER) {
> base_addr = *(void **)base_addr + field->start;
> --
> 1.7.4
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] Re: [PATCH 2/9] vmstate: Fix varrays with uint8 indexes
2011-03-18 10:34 ` Yoshiaki Tamura
@ 2011-03-18 12:04 ` Juan Quintela
2011-03-18 12:37 ` Yoshiaki Tamura
2011-03-22 6:23 ` Yoshiaki Tamura
0 siblings, 2 replies; 16+ messages in thread
From: Juan Quintela @ 2011-03-18 12:04 UTC (permalink / raw)
To: Yoshiaki Tamura; +Cc: qemu-devel
Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> wrote:
> Juan, Anthony,
>
> It seems this patch broke live migration in my environment. The guest
> hangs after switching to remote. The following is parameters of the
> guest.
>
> -L /usr/local/seabios --enable-kvm -M pc -m 512 -smp 1 -monitor stdio
> -localtime -boot c -drive file=/vm/fedora13.img,if=virtio -net
> nic,macaddr=54:52:00:47:a5:a8,model=virtio -net tap -parallel none
> -usb -vnc :0
>
> Have you seen similar issues?
Fix sent to the list, waiting for Anthony to apply it.
Subject: [PATCH] Fix migration uint8 arrys handled
Anthony, please apply that one.
Later, Juan.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] Re: [PATCH 2/9] vmstate: Fix varrays with uint8 indexes
2011-03-18 12:04 ` [Qemu-devel] " Juan Quintela
@ 2011-03-18 12:37 ` Yoshiaki Tamura
2011-03-22 6:23 ` Yoshiaki Tamura
1 sibling, 0 replies; 16+ messages in thread
From: Yoshiaki Tamura @ 2011-03-18 12:37 UTC (permalink / raw)
To: quintela; +Cc: qemu-devel
Ah, now I see what the problem was.
Yoshi
2011/3/18 Juan Quintela <quintela@redhat.com>:
> Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> wrote:
>> Juan, Anthony,
>>
>> It seems this patch broke live migration in my environment. The guest
>> hangs after switching to remote. The following is parameters of the
>> guest.
>>
>> -L /usr/local/seabios --enable-kvm -M pc -m 512 -smp 1 -monitor stdio
>> -localtime -boot c -drive file=/vm/fedora13.img,if=virtio -net
>> nic,macaddr=54:52:00:47:a5:a8,model=virtio -net tap -parallel none
>> -usb -vnc :0
>>
>> Have you seen similar issues?
>
> Fix sent to the list, waiting for Anthony to apply it.
>
> Subject: [PATCH] Fix migration uint8 arrys handled
>
> Anthony, please apply that one.
>
> Later, Juan.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] Re: [PATCH 2/9] vmstate: Fix varrays with uint8 indexes
2011-03-18 12:04 ` [Qemu-devel] " Juan Quintela
2011-03-18 12:37 ` Yoshiaki Tamura
@ 2011-03-22 6:23 ` Yoshiaki Tamura
1 sibling, 0 replies; 16+ messages in thread
From: Yoshiaki Tamura @ 2011-03-22 6:23 UTC (permalink / raw)
To: quintela; +Cc: qemu-devel
2011/3/18 Juan Quintela <quintela@redhat.com>:
> Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> wrote:
>> Juan, Anthony,
>>
>> It seems this patch broke live migration in my environment. The guest
>> hangs after switching to remote. The following is parameters of the
>> guest.
>>
>> -L /usr/local/seabios --enable-kvm -M pc -m 512 -smp 1 -monitor stdio
>> -localtime -boot c -drive file=/vm/fedora13.img,if=virtio -net
>> nic,macaddr=54:52:00:47:a5:a8,model=virtio -net tap -parallel none
>> -usb -vnc :0
>>
>> Have you seen similar issues?
>
> Fix sent to the list, waiting for Anthony to apply it.
>
> Subject: [PATCH] Fix migration uint8 arrys handled
>
> Anthony, please apply that one.
This patch (commit:b784421ce4cc860315f4ec31bbc3d67e91984074)
actually fixed the problem, but it got broken again by the merge
after the commit...
Yoshi
>
> Later, Juan.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-03-22 6:23 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 11:33 [Qemu-devel] [PATCH 0/9] VMState infrastructure Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 1/9] vmstate: add VMSTATE_UINT32_EQUAL Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 2/9] vmstate: Fix varrays with uint8 indexes Juan Quintela
2011-03-18 10:34 ` Yoshiaki Tamura
2011-03-18 12:04 ` [Qemu-devel] " Juan Quintela
2011-03-18 12:37 ` Yoshiaki Tamura
2011-03-22 6:23 ` Yoshiaki Tamura
2011-03-10 11:33 ` [Qemu-devel] [PATCH 3/9] vmstate: add UINT32 VARRAYS Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 4/9] vmstate: add VMSTATE_STRUCT_VARRAY_INT32 Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 5/9] vmstate: add VMSTATE_INT64_ARRAY Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_STRUCT_VARRAY_UINT32 Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 7/9] vmstate: Add a way to send a partial array Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 8/9] vmstate: be able to store/save a pci device from a pointer Juan Quintela
2011-03-10 11:33 ` [Qemu-devel] [PATCH 9/9] vmstate: move timers to use test instead of version Juan Quintela
2011-03-10 13:56 ` [Qemu-devel] [PATCH 0/9] VMState infrastructure Anthony Liguori
2011-03-10 23:18 ` Anthony Liguori
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).