Message ID | 20170913132417.24384-17-david@redhat.com |
---|---|
State | New |
Headers | show |
Series | s390x cleanups and CPU hotplug via device_add | expand |
On 13.09.2017 15:24, David Hildenbrand wrote: > E.g. the following now works: > device_add host-s390-cpu,id=cpu1,core-id=1 Hi David, FYI, this introduced a possibility to crash QEMU with the none machine: $ s390x-softmmu/qemu-system-s390x -M none -nographic QEMU 2.10.50 monitor - type 'help' for more information (qemu) device_add qemu-s390-cpu Segmentation fault (core dumped) Thomas
On 28.09.2017 08:01, Thomas Huth wrote: > On 13.09.2017 15:24, David Hildenbrand wrote: >> E.g. the following now works: >> device_add host-s390-cpu,id=cpu1,core-id=1 > > Hi David, > > FYI, this introduced a possibility to crash QEMU with the none machine: > > $ s390x-softmmu/qemu-system-s390x -M none -nographic > QEMU 2.10.50 monitor - type 'help' for more information > (qemu) device_add qemu-s390-cpu > Segmentation fault (core dumped) > > Thomas > Interesting, x86 shields hotplug for none completely. t460s: ~/git/qemu s390x_lap $ sudo qemu-system-x86_64 -M none -smp 1,maxcpus=4 -monitor stdio -Sqemu-system-x86_64: Number of SMP CPUs requested (4) exceeds max CPUs supported by machine 'none' (1) Will send a patch.
On 28.09.2017 08:01, Thomas Huth wrote: > On 13.09.2017 15:24, David Hildenbrand wrote: >> E.g. the following now works: >> device_add host-s390-cpu,id=cpu1,core-id=1 > > Hi David, > > FYI, this introduced a possibility to crash QEMU with the none machine: > > $ s390x-softmmu/qemu-system-s390x -M none -nographic > QEMU 2.10.50 monitor - type 'help' for more information > (qemu) device_add qemu-s390-cpu > Segmentation fault (core dumped) > > Thomas > Interestingly, this is already fixed by my patch s390x: raise CPU hotplug irq after really hotplugged part of the SMP series.
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 8c1c644057..5724dffb88 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -467,6 +467,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) scc->parent_realize = dc->realize; dc->realize = s390_cpu_realizefn; dc->props = s390x_cpu_properties; + dc->user_creatable = true; scc->parent_reset = cc->reset; #if !defined(CONFIG_USER_ONLY)