Received: from eggs.gnu.org ([2001:4830:134:3::10]:59944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZV60-00054s-Mk for qemu-devel@nongnu.org; Mon, 15 Aug 2016 23:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZV5w-0002u9-GF for qemu-devel@nongnu.org; Mon, 15 Aug 2016 23:31:19 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:64563 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZV5w-0002u5-Bi for qemu-devel@nongnu.org; Mon, 15 Aug 2016 23:31:16 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7G3ST3S094712 for ; Mon, 15 Aug 2016 23:31:13 -0400 Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by mx0b-001b2d01.pphosted.com with ESMTP id 24th4fns9s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 15 Aug 2016 23:31:13 -0400 Received: from localhost by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Aug 2016 13:31:10 +1000 Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id DFF932CE8057 for ; Tue, 16 Aug 2016 13:31:07 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7G3V7TZ23855234 for ; Tue, 16 Aug 2016 13:31:07 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u7G3V7eq025607 for ; Tue, 16 Aug 2016 13:31:07 +1000 Date: Tue, 16 Aug 2016 09:01:01 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1471316861-5248-1-git-send-email-douly.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471316861-5248-1-git-send-email-douly.fnst@cn.fujitsu.com> Message-Id: <20160816033101.GF4514@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH v4] docs: add cpu-hotplug.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dou Liyang Cc: qemu-devel@nongnu.org, imammedo@redhat.com, david@gibson.dropbear.id.au, ehabkost@redhat.com, berrange@redhat.com, armbru@redhat.com, drjones@redhat.com On Tue, Aug 16, 2016 at 11:07:41AM +0800, Dou Liyang wrote: > This document describes how to use cpu hotplug in QEMU. > > Signed-off-by: Andrew Jones > Signed-off-by: Dou Liyang > --- > Change log v3 -> v4 > From David's advice > 1. add spapr examples > 2. Fix some comment > From drew's advice > 1. Fix some syntax > > Change log v2 -> v3: > From drew's advice: > 1. modify the examples. > 2. Fix some syntax. > > Change log v1 -> v2: > From Fam's advice: > 1. Fix some comment. > > Change log v1: > From Igor's advice: > 1. Remove any mentioning of apic-id from the document. > 2. Remove the "device_del qom_path" from the CPU hot-unplug. > 3. Fix some comment. > > docs/cpu-hotplug.txt | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 132 insertions(+) > create mode 100644 docs/cpu-hotplug.txt > > diff --git a/docs/cpu-hotplug.txt b/docs/cpu-hotplug.txt > new file mode 100644 > index 0000000..0c1bfe9 > --- /dev/null > +++ b/docs/cpu-hotplug.txt > @@ -0,0 +1,132 @@ > +QEMU CPU hotplug > +================ > + > +This document explains how to use the CPU hotplug feature in QEMU, > +which regards the CPU as a device, using -device/device_add and > +device_del. > + > +QEMU support was merged for 2.7. > + > +Guest support is required for CPU hotplug to work. > + > +CPU hot-plug > +------------ > + > +In order to be able to hotplug CPUs, QEMU has to be told the maximum > +number of CPUs which the guest can have. This is done at startup time > +by means of the -smp command-line option, which has the following > +format: > + > + -smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads] > + [,sockets=sockets] > + > +Where, > + > + - "cpus" sets the number of CPUs to 'n' [default=1]. > + - "maxcpus" sets the maximum number of CPUs, including offline VCPUs > + for hotplug. > + - "sockets" sets the number of discrete sockets in the system. > + - "cores" sets the number of CPU cores on one socket. > + - "threads" sets the number of threads on one CPU core. > + > +For example, the following command-line: > + > + qemu [...] -smp 3,maxcpus=8,sockets=2,cores=2,threads=2 This is not a valid topology on sPAPR. In the documentation, why not have a bit more generic topology that is likely to work for most archs ? Like -smp 4,maxcpus=8,sockets=2,cores=2,threads=2. Regards, Bharata.