From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a40I1-00086Y-6V for qemu-devel@nongnu.org; Wed, 02 Dec 2015 00:49:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a40Hy-0007BD-4R for qemu-devel@nongnu.org; Wed, 02 Dec 2015 00:49:17 -0500 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:43134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a40Hx-0007Ah-BI for qemu-devel@nongnu.org; Wed, 02 Dec 2015 00:49:14 -0500 Received: from localhost by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Dec 2015 11:19:10 +0530 Date: Wed, 2 Dec 2015 11:19:02 +0530 From: Bharata B Rao Message-ID: <20151202054902.GB21491@in.ibm.com> References: <1448024079-20808-1-git-send-email-bharata@linux.vnet.ibm.com> <1448024079-20808-10-git-send-email-bharata@linux.vnet.ibm.com> <20151201013406.GH31343@voom.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151201013406.GH31343@voom.redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 09/10] spapr: CPU hot unplug support Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, pbonzini@redhat.com, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, imammedo@redhat.com, afaerber@suse.de On Tue, Dec 01, 2015 at 12:34:06PM +1100, David Gibson wrote: > On Fri, Nov 20, 2015 at 06:24:38PM +0530, Bharata B Rao wrote: > > Support hot removal of CPU for sPAPR guests by sending the hot unplug > > notification to the guest via EPOW interrupt. Release the vCPU object > > after CPU hot unplug so that vCPU fd can be parked and reused. > > > > Signed-off-by: Bharata B Rao > > --- > > hw/ppc/spapr.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 71 insertions(+) > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 4434d45..6dca553 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -2401,11 +2401,82 @@ static void spapr_machine_device_plug(HotplugHandler *hotplug_dev, > > } > > } > > > > +static void spapr_cpu_destroy(PowerPCCPU *cpu) > > +{ > > + sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); > > + > > + xics_cpu_destroy(spapr->icp, cpu); > > + qemu_unregister_reset(spapr_cpu_reset, cpu); > > +} > > + > > +static void spapr_cpu_release(DeviceState *dev, void *opaque) > > I'd prefer to see this called "core_release" since "cpu" doesn't make > it clear that it's acting on a whole core. Sure. Thanks for your review, will address your comments in the next iteration. Regards, Bharata.