Re: [Qemu-devel] [RFC PATCH v2 12/49] mc146818rtc: add missed field to vmstate

2014-07-28 Thread Paolo Bonzini
Il 17/07/2014 13:03, Pavel Dovgalyuk ha scritto:
> This patch adds irq_reinject_on_ack_count field to VMState to allow correct
> saving/loading the state of MC146818 RTC.
> 
> Signed-off-by: Pavel Dovgalyuk 
> ---
>  hw/timer/mc146818rtc.c |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
> index 9d817ca..c204abb 100644
> --- a/hw/timer/mc146818rtc.c
> +++ b/hw/timer/mc146818rtc.c
> @@ -735,7 +735,7 @@ static int rtc_post_load(void *opaque, int version_id)
>  
>  static const VMStateDescription vmstate_rtc = {
>  .name = "mc146818rtc",
> -.version_id = 3,
> +.version_id = 4,
>  .minimum_version_id = 1,
>  .post_load = rtc_post_load,
>  .fields = (VMStateField[]) {
> @@ -752,6 +752,7 @@ static const VMStateDescription vmstate_rtc = {
>  VMSTATE_INT64_V(offset, RTCState, 3),
>  VMSTATE_TIMER_V(update_timer, RTCState, 3),
>  VMSTATE_UINT64_V(next_alarm_time, RTCState, 3),
> +VMSTATE_UINT16_V(irq_reinject_on_ack_count, RTCState, 4),

Also can be a subsection, migrated only if nonzero.

Paolo

>  VMSTATE_END_OF_LIST()
>  }
>  };
> 
> 
> 




[Qemu-devel] [RFC PATCH v2 12/49] mc146818rtc: add missed field to vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch adds irq_reinject_on_ack_count field to VMState to allow correct
saving/loading the state of MC146818 RTC.

Signed-off-by: Pavel Dovgalyuk 
---
 hw/timer/mc146818rtc.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index 9d817ca..c204abb 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -735,7 +735,7 @@ static int rtc_post_load(void *opaque, int version_id)
 
 static const VMStateDescription vmstate_rtc = {
 .name = "mc146818rtc",
-.version_id = 3,
+.version_id = 4,
 .minimum_version_id = 1,
 .post_load = rtc_post_load,
 .fields = (VMStateField[]) {
@@ -752,6 +752,7 @@ static const VMStateDescription vmstate_rtc = {
 VMSTATE_INT64_V(offset, RTCState, 3),
 VMSTATE_TIMER_V(update_timer, RTCState, 3),
 VMSTATE_UINT64_V(next_alarm_time, RTCState, 3),
+VMSTATE_UINT16_V(irq_reinject_on_ack_count, RTCState, 4),
 VMSTATE_END_OF_LIST()
 }
 };