[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugg
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugged devices |
Date: |
Wed, 3 May 2017 17:09:16 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
* Daniel Henrique Barboza (address@hidden) wrote:
<snip>
> static void realize(DeviceState *d, Error **errp)
> {
> sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(d);
> @@ -540,6 +598,8 @@ static void realize(DeviceState *d, Error **errp)
> object_unref(OBJECT(drc));
> }
> g_free(child_name);
> + vmstate_register(DEVICE(drc), drck->get_index(drc), &vmstate_spapr_drc,
> + drc);
> trace_spapr_drc_realize_complete(drck->get_index(drc));
> }
>
> @@ -658,6 +718,7 @@ static void spapr_dr_connector_class_init(ObjectClass *k,
> void *data)
> dk->reset = reset;
> dk->realize = realize;
> dk->unrealize = unrealize;
> + dk->vmsd = &vmstate_spapr_drc;
Are you sure this is right - isn't it unusual to have both
a ->vmsd entry AND a vmstate_register?
a ->vmsd = is the preferable way I think, but I see you're
doing something with the 2nd parameter of vmstate_register;
if you *need* to do that then I think it's the only way.
Dave
> drck->set_isolation_state = set_isolation_state;
> drck->set_indicator_state = set_indicator_state;
> drck->set_allocation_state = set_allocation_state;
> --
> 2.9.3
>
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugged devices,
Dr. David Alan Gilbert <=