qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [RFC/PATCH 0/1] cpu hotplug for s390
@ 2013-05-03 13:50 Jason J. Herne
  2013-05-03 14:13 ` Igor Mammedov
  2013-05-03 14:22 ` Andreas Färber
  0 siblings, 2 replies; 11+ messages in thread
From: Jason J. Herne @ 2013-05-03 13:50 UTC (permalink / raw)
  To: ehabkost, qemu-devel@nongnu.org qemu-devel, Christian Borntraeger,
	Jens Freimann, imammedo, afaerber, Alexander Graf

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.

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?

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.

I'm interested in thoughts and comments.  Thanks!

-- 
-- Jason J. Herne (jjherne@linux.vnet.ibm.com)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Qemu-devel] [RFC/PATCH 0/1] cpu hotplug for s390
@ 2013-04-03  6:42 Jens Freimann
  2013-04-17 18:06 ` Andreas Färber
  0 siblings, 1 reply; 11+ messages in thread
From: Jens Freimann @ 2013-04-03  6:42 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Eduardo Habkost, qemu-devel, Christian Borntraeger, Jens Freimann,
	Cornelia Huck, Igor Mammedov, Andreas Färber

Hi all,

this is what our approach to CPU hotplug looks like.
With respect to Igor's CPU hotplug series, how should we proceed? 
Should we change the interface to 
qemu_system_cpu_add_notifier/qemu_system_cpu_hotplug_request/cpu-add etc?

Feedback regarding the non-API part is also highly welcome!

regards
Jens

Thang Pham (1):
  s390: implement CPU hotplug

 hmp-commands.hx           |  14 +++++
 hw/s390x/Makefile.objs    |   2 +-
 hw/s390x/event-facility.c |   9 ++++
 hw/s390x/event-facility.h |   3 ++
 hw/s390x/s390-virtio.c    |  34 +++++++++---
 hw/s390x/sclp.c           | 134 +++++++++++++++++++++++++++++++++++++++++++++-
 hw/s390x/sclp.h           |  47 +++++++++++++++-
 include/sysemu/sysemu.h   |   1 +
 monitor.c                 |  31 +++++++++++
 target-s390x/cpu.c        |  59 ++++++++++++++++++++
 target-s390x/cpu.h        |   7 +++
 target-s390x/helper.c     |  43 +++++++++++++++
 vl.c                      |   6 +++
 13 files changed, 379 insertions(+), 11 deletions(-)

-- 
1.7.12.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-03 14:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).