|
From: | Daniel Henrique Barboza |
Subject: | Re: [Qemu-devel] [PATCH 2/4] hw/ppc: migrating the DRC state of hotplugged devices |
Date: | Wed, 3 May 2017 15:05:24 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 05/03/2017 01:09 PM, Dr. David Alan Gilbert wrote:
* 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?
I've changed the code to use vmstate_register but forgot to remove the ->vmsd entry that was being used in v6. Thanks for pointing it out Dave. I'll fix it in v9. Daniel
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. Davedrck->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
[Prev in Thread] | Current Thread | [Next in Thread] |