From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGLOP-0000Cx-PF for qemu-devel@nongnu.org; Wed, 28 Jan 2015 00:42:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGLOL-00038u-Mr for qemu-devel@nongnu.org; Wed, 28 Jan 2015 00:42:21 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:32792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGLOL-00038q-GO for qemu-devel@nongnu.org; Wed, 28 Jan 2015 00:42:17 -0500 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Jan 2015 22:42:16 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id BC93219D801C for ; Tue, 27 Jan 2015 22:33:24 -0700 (MST) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t0S5g5hL33751180 for ; Tue, 27 Jan 2015 22:42:13 -0700 Received: from d03av03.boulder.ibm.com (localhost [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t0S5ffm4016876 for ; Tue, 27 Jan 2015 22:41:41 -0700 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <20150128041956.GA3393@in.ibm.com> References: <1420697420-16053-1-git-send-email-bharata@linux.vnet.ibm.com> <1420697420-16053-7-git-send-email-bharata@linux.vnet.ibm.com> <20150122221601.30063.38097@loki> <20150128041956.GA3393@in.ibm.com> Message-ID: <20150128054119.11140.24166@loki> Date: Tue, 27 Jan 2015 23:41:19 -0600 Subject: Re: [Qemu-devel] [RFC PATCH v1 06/13] spapr: CPU hotplug support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bharata@linux.vnet.ibm.comBharata B Rao Cc: imammedo@redhat.com, qemu-devel@nongnu.org, agraf@suse.de Quoting Bharata B Rao (2015-01-27 22:19:56) > 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. I mean in terms of the "/* TODO: Check if DR is enabled ? */". Adding this check here, as well as during spapr_dr_connector_new(), should cover all the cases where the value needs to be checked AFAICT. > = > Regards, > Bharata.