Am 13.09.2013 17:29, schrieb Jason J. Herne: > 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.
This whole file should never get compiled for CONFIG_USER_ONLY. > 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? I've pushed it to qom-cpu-next branch for now, suggest to rebase on that. It all depends on when I get to review all the pending patches and respin some interfering ones and then get someone to pull, which is outside of my control. Cheers, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg