Il 21/11/2013 03:38, Igor Mammedov ha scritto: > diff --git a/include/hw/mem/dimm.h b/include/hw/mem/dimm.h > index abedae2..b655006 100644 > --- a/include/hw/mem/dimm.h > +++ b/include/hw/mem/dimm.h > @@ -65,11 +65,15 @@ typedef struct DimmDeviceClass { > * @parent_obj: opaque parent object container > * @base: address from which to start mapping @DimmDevice > * @as: hot-plugabble memory area where @DimmDevice-s are attached > + * @hotplug_dev: device that hotplugs realized DimmDevice > + * @hotplug: hotplug callback set by the board > */ > typedef struct DimmBus { > BusState parent_obj; > hwaddr base; > MemoryRegion as; > + DeviceState *hotplug_dev; > + hotplug_fn hotplug; > } DimmBus; > > /** >
So the alternatives here would be: (1) have DimmDevice call hotplug/hot_unplug in DimmBus; add a ACPIHotplugDimmBus subclass that connects to ACPI. (2) have DeviceState call hotplug/hot_unplug in BusState; DimmBus does nothing with it, and a ACPIHotplugDimmBus subclass implements it. Paolo