On 09/05/2013 08:38 AM, Andreas Färber wrote:
Am 01.08.2013 16:12, schrieb Jason J. Herne:
From: "Jason J. Herne" <jjhe...@us.ibm.com>
Implement hot_add_cpu for S390 to allow hot plugging of cpus.
Signed-off-by: Jason J. Herne <jjhe...@us.ibm.com>
---
hw/s390x/s390-virtio-ccw.c | 3 +++
target-s390x/cpu.c | 32 ++++++++++++++++++++++++++++++++
target-s390x/cpu.h | 2 ++
3 files changed, 37 insertions(+)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index b469960..30b6a48 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -117,6 +117,9 @@ static QEMUMachine ccw_machine = {
.alias = "s390-ccw",
.desc = "VirtIO-ccw based S390 machine",
.init = ccw_init,
+#if !defined(CONFIG_USER_ONLY)
+ .hot_add_cpu = ccw_hot_add_cpu,
+#endif
I doubt this #ifdeffery is necessary here?
This was needed because ccw_hot_add_cpu calls s390_cpu_addr2state which
is wrapped in the very same ifdef. However, the offending line is this:
model_str = s390_cpu_addr2state(0)->env.cpu_model_str;
Since we're doing away with that line anyway I can probably remove that
ifdef. However, does it make sense to have a cpu-add command for the
linux-user target?
Also, do you know when your patch to remove the model string will hit
the master branch?
--
-- Jason J. Herne (jjhe...@linux.vnet.ibm.com)