Searched hist:"22419 c2a" (Results 1 – 1 of 1) sorted by relevance
/openbmc/qemu/hw/ppc/ |
H A D | spapr.c | 22419c2a Mon Sep 07 20:21:31 CDT 2015 David Gibson <david@gibson.dropbear.id.au> pseries: Fix incorrect calculation of threads per socket for chip-id The device tree presented to pseries machine type guests includes an ibm,chip-id property which gives essentially the socket number of each vcpu core (individual vcpu threads don't get a node in the device tree). To calculate this, it uses a vcpus_per_socket variable computed as (smp_cpus / #sockets). This is correct for the usual case where smp_cpus == smp_threads * smp_cores * #sockets. However, you can start QEMU with the number of cores and threads mismatching the total number of vcpus (whether that _should_ be permitted is a topic for another day). It's a bit hard to say what the "real" number of vcpus per socket here is, but for most purposes (smp_threads * smp_cores) will more meaningfully match how QEMU behaves with respect to socket boundaries. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|