Skip to contentSkip to conversation

fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail

PATCH Applied Zhang Haoyu 3 participants 5 messages Feb 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail

fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail during incoming migration or loadvm.

---
 hw/timer/mc146818rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/timer/mc146818rtc.c +1 -1
index 5a107fa..0600c9a 100644
@@ -734,7 +734,7 @@ static int rtc_post_load(void *opaque, int version_id)
 }
 
 static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
-    .name = "irq_reinject_on_ack_count",
+    .name = "mc146818rtc/irq_reinject_on_ack_count",
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Zhang Haoyu

fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail during incoming migration or loadvm.

---
 hw/timer/mc146818rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/timer/mc146818rtc.c +0 -0
index 5a107fa..0600c9a 100644

hw/timer/mc146818rtc.c static int rtc_post_load(void *opaque, int version_id) · line 740

Quoted 8 lines
hw/timer/mc146818rtc.c +1 -1
@@ -734,7 +734,7 @@ static int rtc_post_load(void *opaque, int version_id)
 }
 
 static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
-    .name = "irq_reinject_on_ack_count",
+    .name = "mc146818rtc/irq_reinject_on_ack_count",
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {

Adding Amit.

It would be nice if registering a subsection automatically caught wrongly-named ones...

Paolo

#2 lore raw
Quoted 26 lines · Paolo Bonzini
Quoted 14 lines · Zhang Haoyu

fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail during incoming migration or loadvm.

---
 hw/timer/mc146818rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/timer/mc146818rtc.c +0 -0
index 5a107fa..0600c9a 100644

hw/timer/mc146818rtc.c static int rtc_post_load(void *opaque, int version_id) · line 740

Quoted 8 lines
hw/timer/mc146818rtc.c +1 -1
@@ -734,7 +734,7 @@ static int rtc_post_load(void *opaque, int version_id)
 }
 
 static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
-    .name = "irq_reinject_on_ack_count",
+    .name = "mc146818rtc/irq_reinject_on_ack_count",
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {

Adding Amit.

Quoted 4 lines

It would be nice if registering a subsection automatically caught wrongly-named ones...

You are right here.

THere is another check that I would like, that we only have subsections at the top livel.

Thanks, JUan.

Quoted 1 line

Paolo

#3 lore raw
Quoted 6 lines · Juan Quintela
Quoted 2 lines
Quoted 2 lines

It would be nice if registering a subsection automatically caught wrongly-named ones...

You are right here.

THere is another check that I would like, that we only have subsections at the top livel.

You mean not inside structs? IIRC that would fail.

Paolo

#4 lore raw
In reply to Zhang Haoyu
Quoted 13 lines · Zhang Haoyu

fix mc146818rtc wrong subsection name to avoid vmstate_subsection_load() fail during incoming migration or loadvm.

---
 hw/timer/mc146818rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/timer/mc146818rtc.c +0 -0
index 5a107fa..0600c9a 100644

hw/timer/mc146818rtc.c static int rtc_post_load(void *opaque, int version_id) · line 740

Quoted 8 lines
hw/timer/mc146818rtc.c +1 -1
@@ -734,7 +734,7 @@ static int rtc_post_load(void *opaque, int version_id)
 }
 
 static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
-    .name = "irq_reinject_on_ack_count",
+    .name = "mc146818rtc/irq_reinject_on_ack_count",
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {

Ack

applied to my tree.