qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v1 06/13] spapr: CPU hotplug support


From: Bharata B Rao
Subject: Re: [Qemu-devel] [RFC PATCH v1 06/13] spapr: CPU hotplug support
Date: Wed, 28 Jan 2015 09:49:56 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Jan 22, 2015 at 04:16:01PM -0600, Michael Roth wrote:
> Quoting Bharata B Rao (2015-01-08 00:10:13)
> > +static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,
> > +                                      DeviceState *dev, Error **errp)
> > +{
> > +    if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
> > +        if (dev->hotplugged) {
> 
> Maybe just
> 
>            if (dev->hotplugged && spapr->dr_cpu_enabled) {
>                ...
> 
> Would do it

This is a common ->plug() handler and would be used for memory too. Hence
there is a need to identify the type of object (CPU or memory) and handle it
differently.

Regards,
Bharata.




reply via email to

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