qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/27] dimm: add hotplug callback to DimmBus


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 12/27] dimm: add hotplug callback to DimmBus
Date: Mon, 25 Nov 2013 15:40:04 +0100

On Mon, 25 Nov 2013 14:01:51 +0100
Paolo Bonzini <address@hidden> wrote:

> 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.

Thanks,
I'll try to implement it this way.

> Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]