[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/10] pcspk: adding vmstate for save/restore
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 04/10] pcspk: adding vmstate for save/restore |
Date: |
Wed, 10 Sep 2014 15:02:00 +0300 |
On Tue, Sep 09, 2014 at 03:28:43PM +0200, Paolo Bonzini wrote:
> Il 09/09/2014 15:26, Juan Quintela ha scritto:
> > Paolo Bonzini <address@hidden> wrote:
> >> From: Pavel Dovgalyuk <address@hidden>
> >>
> >> VMState added by this patch preserves correct
> >> loading of the PC speaker device state.
> >>
> >> This breaks migration to 2.1 and earlier.
> >>
> >> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> >> Signed-off-by: Paolo Bonzini <address@hidden>
> >
> > This should only be added for new machine types, right?
>
> We never did that in the past. Maybe downstream.
>
> Paolo
That's not too hard: we need two types that only
differ in the vmstate.
Use the correct one to create the device depending
on the pc type.
Put in that light, we definitely did create new
devices while keeping old ones around for
compatibility.
> > Later, Juan.
> >
> >> @@ -192,6 +203,7 @@ static void pcspk_class_initfn(ObjectClass *klass,
> >> void *data)
> >>
> >> dc->realize = pcspk_realizefn;
> >> set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
> >> + dc->vmsd = &vmstate_spk;
> >> dc->props = pcspk_properties;
> >> /* Reason: pointer property "pit", realize sets global pcspk_state */
> >> dc->cannot_instantiate_with_device_add_yet = true;
>
- Re: [Qemu-devel] [PATCH 02/10] apic_common: vapic_paddr synchronization fix, (continued)
- [Qemu-devel] [PATCH 03/10] cpu: init vmstate for ticks and clock offset, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 01/10] vl: use QLIST_FOREACH_SAFE to visit change state handlers, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 04/10] pcspk: adding vmstate for save/restore, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 06/10] parallel: adding vmstate for save/restore, Paolo Bonzini, 2014/09/09
- [Qemu-devel] [PATCH 05/10] fdc: adding vmstate for save/restore, Paolo Bonzini, 2014/09/09