From: Igor Mammedov <imammedo@redhat.com>
To: jjherne@linux.vnet.ibm.com
Cc: ehabkost@redhat.com, Alexander Graf <agraf@suse.de>,
"qemu-devel@nongnu.org qemu-devel" <qemu-devel@nongnu.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
afaerber@suse.de
Subject: Re: [Qemu-devel] [RFC/PATCH 0/1] cpu hotplug for s390
Date: Fri, 3 May 2013 16:13:03 +0200 [thread overview]
Message-ID: <20130503161303.000590d0@thinkpad> (raw)
In-Reply-To: <5183C0BA.9010403@linux.vnet.ibm.com>
On Fri, 03 May 2013 09:50:50 -0400
"Jason J. Herne" <jjherne@linux.vnet.ibm.com> wrote:
> I've done some investigating into using the device_add hmp/qmp command
> to support hot-plugging cpus on S390. The alternative suggestion was to
> simply use a new cpu_add hmp/qmp command.
>
> device_add accepts all of the same options as the -device command line
> parameter takes. This would imply that to hot-plug cpu's using device
> add we would need to allow command line arguments of type "-device cpu".
> All of the implications of this are not currently clear to me. How
> would this interact with the -smp option, for example, how many cpus are
> created in this case:
> qemu -smp 2 -device cpu,id=cpu0 -device cpu,id=cpu1, -device
> cpu,id=cpu2
> Is -smp invalid when cpu devices are specified? We would have to fill
> the smp_cpus variable after all (cpu) devices have been parsed.
I haven't looked using -device in case of x86 it would require some extra
work besides planned properties+classes to make it usable.
However device_add for your case should be usable and there is no need to use
-device with it.
-smp x,maxcpus=y will tell board how many CPUs 'x' should be created and
'y' - 'x' how many extra CPUs could be added later.
>
> Since device_add requires a QOM object name (driver parameter) we
> seem to have
> two choices.
> 1. device_add cpu
> 2. device_add s390-cpu
> But "cpu" is actually an abstract QOM class and cannot be instantiated
> by object_new("cpu") as is done in device_add processing. So we need to
> use "s390-cpu". This adds an architecture specific flavor to cpu
> hotplug. I would think we'd want to avoid that somehow. perhaps we
> simply "translate" that parameter during early device_add processing?
that is exactly intention to use architecture specific types there so that
one could specify what kind/flavor of CPU needs to be added using type names.
> Another issue is that the s390-cpu QOM object class is a child of
> "main-system-bus". This bus does not support hotplug:
> sysbus->allow_hotplug=0. In order to implement cpu hotplug we would need
> to either switch sysbus->allow_hotplug to 1, or the s390-cpu QOM object
> class would need to move to a bus that supports hotplug. I'm not sure
> what the implications of either choice would be.
For x86 CPU was moved to ICC bus that existed in real hardware, probably there
is similar bus for s390. Alternatively you can consider if s390-cpu could be
bus-less, since commit 2f7bd829db it's possible device_add bus-less devices.
> I'm interested in thoughts and comments. Thanks!
>
> --
> -- Jason J. Herne (jjherne@linux.vnet.ibm.com)
>
--
Regards,
Igor
next prev parent reply other threads:[~2013-05-03 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 13:50 [Qemu-devel] [RFC/PATCH 0/1] cpu hotplug for s390 Jason J. Herne
2013-05-03 14:13 ` Igor Mammedov [this message]
2013-05-03 14:22 ` Andreas Färber
-- strict thread matches above, loose matches on Subject: below --
2013-04-03 6:42 Jens Freimann
2013-04-17 18:06 ` Andreas Färber
2013-04-17 18:14 ` Eduardo Habkost
2013-04-19 7:51 ` Jens Freimann
2013-04-19 13:16 ` Andreas Färber
2013-04-19 14:28 ` Igor Mammedov
2013-04-19 19:13 ` Christian Borntraeger
2013-04-19 19:58 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130503161303.000590d0@thinkpad \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=ehabkost@redhat.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).