[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/10] mc146818rtc: add missed field to vmstate
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 10/10] mc146818rtc: add missed field to vmstate |
Date: |
Tue, 09 Sep 2014 14:58:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> wrote:
> From: Pavel Dovgalyuk <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
Acked-by: Juan Quintela <address@hidden>
> ---
> hw/timer/mc146818rtc.c | 24 +++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
> index 17912b8..2c4b650 100644
> --- a/hw/timer/mc146818rtc.c
> +++ b/hw/timer/mc146818rtc.c
> @@ -733,6 +733,22 @@ static int rtc_post_load(void *opaque, int version_id)
> return 0;
> }
>
> +static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
> + .name = "irq_reinject_on_ack_count",
> + .version_id = 1,
> + .minimum_version_id = 1,
> + .fields = (VMStateField[]) {
> + VMSTATE_UINT16(irq_reinject_on_ack_count, RTCState),
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> +static bool rtc_irq_reinject_on_ack_count_needed(void *opaque)
> +{
> + RTCState *s = (RTCState *)opaque;
If you have to resend for any reason, please remove this unneeded cast.
> + return s->irq_reinject_on_ack_count != 0;
> +}
> +
> static const VMStateDescription vmstate_rtc = {
> .name = "mc146818rtc",
> .version_id = 3,
> @@ -753,6 +769,14 @@ static const VMStateDescription vmstate_rtc = {
> VMSTATE_TIMER_V(update_timer, RTCState, 3),
> VMSTATE_UINT64_V(next_alarm_time, RTCState, 3),
> VMSTATE_END_OF_LIST()
> + },
> + .subsections = (VMStateSubsection[]) {
> + {
> + .vmsd = &vmstate_rtc_irq_reinject_on_ack_count,
> + .needed = rtc_irq_reinject_on_ack_count_needed,
> + }, {
> + /* empty */
> + }
> }
> };
- Re: [Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore, (continued)
- [Qemu-devel] [PATCH 05/10] fdc: adding vmstate for save/restore, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 07/10] serial: fixing vmstate for save/restore, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 08/10] pckbd: adding new fields to vmstate, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 10/10] mc146818rtc: add missed field to vmstate, Paolo Bonzini, 2014/09/09
- Re: [Qemu-devel] [PATCH 10/10] mc146818rtc: add missed field to vmstate,
Juan Quintela <=
- [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Paolo Bonzini, 2014/09/09
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Juan Quintela, 2014/09/09
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Michael S. Tsirkin, 2014/09/09
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Paolo Bonzini, 2014/09/09
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Michael S. Tsirkin, 2014/09/09
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Paolo Bonzini, 2014/09/10
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Peter Maydell, 2014/09/10
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Paolo Bonzini, 2014/09/10
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Michael S. Tsirkin, 2014/09/10
- Re: [Qemu-devel] [PATCH 09/10] piix: do not raise irq while loading vmstate, Michael S. Tsirkin, 2014/09/10