From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biRLg-0005Oo-Jf for qemu-devel@nongnu.org; Fri, 09 Sep 2016 15:20:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biRLa-0004yi-Ed for qemu-devel@nongnu.org; Fri, 09 Sep 2016 15:20:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biRLa-0004yQ-8R for qemu-devel@nongnu.org; Fri, 09 Sep 2016 15:20:22 -0400 Date: Fri, 9 Sep 2016 16:20:18 -0300 From: Eduardo Habkost Message-ID: <20160909192018.GK24695@thinpad.lan.raisama.net> References: <1471485050-26747-1-git-send-email-douly.fnst@cn.fujitsu.com> <218747645.338872.1471856165532.JavaMail.zimbra@oxygem.tv> <8342e17b-937d-28c9-8784-a3a6722ed433@cn.fujitsu.com> <20160906200518.GE24695@thinpad.lan.raisama.net> <90ccb629-15b4-784c-f14b-cdfda6f08047@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <90ccb629-15b4-784c-f14b-cdfda6f08047@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dou Liyang Cc: Alexandre DERUMIER , qemu-devel , drjones@redhat.com, Markus Armbruster , bharata@linux.vnet.ibm.com, Fam Zheng , Igor Mammedov , david@gibson.dropbear.id.au On Wed, Sep 07, 2016 at 09:52:59AM +0800, Dou Liyang wrote: [...] > > > > The option: > > -smp MODEL,+FOO,+BAR > > I guess you may mean "-cpu", not "-smp" Oops, yes. Thanks. :) > > > is internally translated to: > > -global MODEL.FOO=on > > -global MODEL.BAR=on > > in addition to setting the CPU model for creating initial CPUs to > > MODEL. > > > > I see. > [...] > > > > > > > > -smp sockets=2,cores=2,maxcpus=4 > > > > > > > -device qemu64-x86_64-cpu,id=cpu1,socket-id=1,core-id=1,thread-id=0 > > > > -device qemu64-x86_64-cpu,id=cpu1,socket-id=1,core-id=2,thread-id=0 > > > > -device qemu64-x86_64-cpu,id=cpu3,socket-id=2,core-id=1,thread-id=0 > > > > -device qemu64-x86_64-cpu,id=cpu4,socket-id=2,core-id=2,thread-id=0 > > > > > > > > or does I need minimum 1 non unplugable cpu > > > > As mentioned above, the default number of CPUs is 1, so "-smp > > sockets=2" is the same as "-smp 1,sockets=2". > > > > I assume you mean something like "-smp 0", but that doesn't work > > today. I would like to eventually allow all CPUs to be created > > using -device, but that's not possible yet. > > I am interested in what is the benefit, if we can create all CPUs using > -device. :) Do you mean the benefit of not allowing "-smp 0", or the benefit of using -device? The benefit of not allowing "-smp 0" is none, except that we probably have existing code that would break if we allow that, and that code needs to be fixed first. About -device: the benefit is having an uniform interface to create every kind of device, and using the same interface and options for hotplugged CPUs and non-hotplug CPUs. (But one problem with -device today is that management software needs to know what are the valid socket/core/thread arguments for the machine but can't run a 'query-hotpluggable-cpus' command before launching QEMU [unless it launches QEMU twice]). -- Eduardo