qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt
Date: Fri, 9 Sep 2016 16:20:18 -0300
User-agent: Mutt/1.7.0 (2016-08-17)

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



reply via email to

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