From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNC0s-0005dw-Cg for qemu-devel@nongnu.org; Wed, 05 Aug 2015 23:38:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNC0p-0001si-5B for qemu-devel@nongnu.org; Wed, 05 Aug 2015 23:38:38 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:42060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNC0n-0001qw-Jc for qemu-devel@nongnu.org; Wed, 05 Aug 2015 23:38:35 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Aug 2015 13:38:28 +1000 From: Alexey Kardashevskiy Date: Thu, 6 Aug 2015 13:37:24 +1000 Message-Id: <1438832244-481-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH qemu] spapr: Use QEMU limit for maximum CPUs number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Nikunj A Dadhania , Alexey Kardashevskiy , Alexander Graf , qemu-ppc@nongnu.org, Anton Blanchard , Bharata B Rao , David Gibson sPAPR uses hard coded limit of maximum 255 supported CPUs which is exactly the same as QEMU-wide limit which is MAX_CPUMASK_BITS and also defined as 255. This makes use of a global CPU number limit for the "pseries" machine. In order to anticipate future increase of the MAX_CPUMASK_BITS (or to help debugging large systems), this also bumps the FDT_MAX_SIZE limit from 256K to 1M assuming that 1 CPU core needs roughly 512 bytes in the device tree so the new limit can cover up to 2048 CPU cores. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6e24bf9..b881459 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -76,7 +76,7 @@ * * We load our kernel at 4M, leaving space for SLOF initial image */ -#define FDT_MAX_SIZE 0x40000 +#define FDT_MAX_SIZE 0x100000 #define RTAS_MAX_SIZE 0x10000 #define RTAS_MAX_ADDR 0x80000000 /* RTAS must stay below that */ #define FW_MAX_SIZE 0x400000 @@ -88,8 +88,6 @@ #define TIMEBASE_FREQ 512000000ULL -#define MAX_CPUS 255 - #define PHANDLE_XICP 0x00001111 #define HTAB_SIZE(spapr) (1ULL << ((spapr)->htab_shift)) @@ -2211,7 +2209,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) mc->init = ppc_spapr_init; mc->reset = ppc_spapr_reset; mc->block_default_type = IF_SCSI; - mc->max_cpus = MAX_CPUS; + mc->max_cpus = MAX_CPUMASK_BITS; mc->no_parallel = 1; mc->default_boot_order = ""; mc->default_ram_size = 512 * M_BYTE; -- 2.4.0.rc3.8.gfb3e7d5