Some PowerPC systems can already provide more than 255 hardware threads. Igor also posted a patch recently, to increase the the maxcpus limit to 288 for x86 targets.
This patch bumps the limit to 1024: - 1024 is already the limit for PowerPC KVM in several distros - it has no visible overhead in top - the limit itself has no effect on hot paths We only do that for pseries at the moment and keep a 255 limit for the ARM Virtual Machine. Signed-off-by: Greg Kurz <[email protected]> --- v2: - updated changelog - keep 255 limit in hw/arm/virt.c --- hw/arm/virt.c | 2 +- include/sysemu/sysemu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 56d35c7716e7..438e09c7a57d 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1358,7 +1358,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) * it later in machvirt_init, where we have more information about the * configuration of the particular instance. */ - mc->max_cpus = MAX_CPUMASK_BITS; + mc->max_cpus = 255; mc->has_dynamic_sysbus = true; mc->block_default_type = IF_VIRTIO; mc->no_cdrom = 1; diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 38fb3cad35e1..89d742caa477 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -185,7 +185,7 @@ extern int mem_prealloc; * * Note that cpu->get_arch_id() may be larger than MAX_CPUMASK_BITS. */ -#define MAX_CPUMASK_BITS 255 +#define MAX_CPUMASK_BITS 1024 #define MAX_OPTION_ROMS 16 typedef struct QEMUOptionRom {
