On 8/12/2014 8:40 PM, Brian Rak wrote:
I've been testing 2.1.0, and qemu will no longer start up with our CPU
configuration. I get the error:
qemu-kvm: /root/qemu/src/hw/i386/smbios.c:825: smbios_get_tables:
Assertion `smbios_smp_sockets >= 1' failed.
The relevant parts of my command line:
-smp 4,sockets=2,cores=12,threads=2
This is ultimately coming from my libvirt config of:
<vcpu placement='static'>4</vcpu>
<cpu mode='custom' match='exact'>
<topology sockets='2' cores='12' threads='2'/>
</cpu>
Is this configuration no longer supported? Up until 2.1.0, this was
handled well.. for any CPU count < 12, I got one socket with the correct
number of cores. For anything over 12 vcpus, I got two sockets. This
makes Windows licensing happy.
I took a look at the code, and it seems like it should just cap the
minimum number of sockets at 1, rather then this assert.
--- ../src_clean/hw/i386/smbios.c 2014-08-01 10:12:17.000000000
-0400
+++ hw/i386/smbios.c 2014-08-12 14:39:40.560485901 -0400
@@ -822,7 +822,7 @@
smbios_build_type_3_table();
smbios_smp_sockets = smp_cpus / (smp_cores * smp_threads);
- assert(smbios_smp_sockets >= 1);
+ if (smbios_smp_sockets < 1) smbios_smp_sockets = 1;
for (i = 0; i < smbios_smp_sockets; i++) {
smbios_build_type_4_table(i);
Is there a downside to this patch?
Have you checked why the variable is 0 and not 1 (or 2), maybe there is
a deeper bug which leaves it at 0, even when it should be 2 (or more).
Remember, the place that reports an error is rarely the cause of the
problem.
Enjoy
Jakob