<div dir="ltr">The man page of qemu(2.6.2), states the following:<br><br>       -smp [cpus=]n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]<br>           Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs to 4.  For the PC target, the number of cores per<br>           socket, the number of threads per cores and the total number of sockets can be specified. Missing values will be computed. *If any on the three values is given, the total number of CPUs n can be<br>           omitted*. maxcpus specifies the maximum number of hotpluggable CPUs.<div><br></div><div>So, I built the master branch of libvirt and tested the following:</div><div><br></div><div>Client:</div><div><br></div><div>$ ./run ./tools/virsh domxml-from-native qemu-argv <(echo '/usr/bin/qemu-system-x86_64 -enable-kvm -smp cores=2,threads=1,sockets=1')</div><div><div>error: Disconnected from qemu:///session due to I/O error</div><div>error: Cannot recv data: Connection reset by peer</div></div><div><br></div><div>Server:</div><div><br></div><div>$ ./run gdb ./daemon/libvirtd</div><div>GNU gdb (GDB) Fedora 7.11.1-86.fc24</div><div>...</div><div>Starting program: /home/wani/libvirt/daemon/.libs/lt-libvirtd </div><div>[Thread debugging using libthread_db enabled]<br></div><div>...</div><div>[Thread 0x7fffc462c700 (LWP 16850) exited]</div><div>...</div><div>Thread 4 "lt-libvirtd" received signal SIGSEGV, Segmentation fault.</div><div>[Switching to Thread 0x7fffe4cf1700 (LWP 16836)]</div><div>qemuDomainDefVcpusPostParse (def=0x7fffb8000ec0) at qemu/qemu_domain.c:2480</div><div>2480<span class="gmail-Apple-tab-span" style="white-space:pre">     </span>    if (!vcpu->online) {</div><div><br></div><div><br></div><div>qemuDomainDefVcpusPostParse() calls vcpu = virDomainDefGetVcpu(def, 0), which returns NULL.<br></div><div><br></div><div>I'd be happy to send a patch, but I am not sure what the right solution is.<br><br>- Should not specifying n to -smp allowed?<br>- Should -cpus=n also be parsed in qemuParseCommandLineSmp()?</div><div><br>Cheers!<br>Nehal J Wani</div></div>