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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 12/27] dimm: add hotplug callback to DimmBus
Date: Mon, 25 Nov 2013 14:01:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

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



reply via email to

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