[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore |
Date: |
Tue, 09 Sep 2014 15:32:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> wrote:
> From: Pavel Dovgalyuk <address@hidden>
>
> VMState added by this patch preserves correct
> loading of the parallel port controller state.
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
This breaks migration with old machine type, but as far as I can see,
parallel is only added when used, and if we are using it, we need this,
right?
If my understanding is correct:
Acked-by: Juan Quintela <address@hidden>
> ---
> hw/char/parallel.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/hw/char/parallel.c b/hw/char/parallel.c
> index 7ac90a5..c2b553f 100644
> --- a/hw/char/parallel.c
> +++ b/hw/char/parallel.c
> @@ -477,6 +477,23 @@ static const MemoryRegionPortio
> isa_parallel_portio_sw_list[] = {
> PORTIO_END_OF_LIST(),
> };
>
> +
> +static const VMStateDescription vmstate_parallel_isa = {
> + .name = "parallel_isa",
> + .version_id = 1,
> + .minimum_version_id = 1,
> + .fields = (VMStateField[]) {
> + VMSTATE_UINT8(state.dataw, ISAParallelState),
> + VMSTATE_UINT8(state.datar, ISAParallelState),
> + VMSTATE_UINT8(state.status, ISAParallelState),
> + VMSTATE_UINT8(state.control, ISAParallelState),
> + VMSTATE_INT32(state.irq_pending, ISAParallelState),
> + VMSTATE_INT32(state.epp_timeout, ISAParallelState),
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> +
> static void parallel_isa_realizefn(DeviceState *dev, Error **errp)
> {
> static int index;
> @@ -606,6 +623,7 @@ static void parallel_isa_class_initfn(ObjectClass *klass,
> void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
>
> dc->realize = parallel_isa_realizefn;
> + dc->vmsd = &vmstate_parallel_isa;
> dc->props = parallel_isa_properties;
> set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
> }
- Re: [Qemu-devel] [PATCH 03/10] cpu: init vmstate for ticks and clock offset, (continued)
[Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore, Paolo Bonzini, 2014/09/09
- Re: [Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore,
Juan Quintela <=
[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
Re: [Qemu-devel] [PATCH 07/10] serial: fixing vmstate for save/restore, Paolo Bonzini, 2014/09/10