From patchwork Wed Sep 23 01:55:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 521555 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F268614030B for ; Wed, 23 Sep 2015 12:07:09 +1000 (AEST) Received: from localhost ([::1]:44357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZSe-0002UT-3S for incoming@patchwork.ozlabs.org; Tue, 22 Sep 2015 22:07:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHN-0007Vu-4H for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeZHJ-00014g-7R for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:28 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:48489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHI-0000yY-TL; Tue, 22 Sep 2015 21:55:25 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 799C7140D21; Wed, 23 Sep 2015 11:55:21 +1000 (AEST) From: David Gibson To: peter.maydell@linaro.org Date: Wed, 23 Sep 2015 11:55:29 +1000 Message-Id: <1442973338-17771-28-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> References: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2401:3900:2:1::2 Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, Bharata B Rao , David Gibson Subject: [Qemu-devel] [PULL 27/36] spapr: Provide better error message when slots exceed max allowed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Bharata B Rao Currently when user specifies more slots than allowed max of SPAPR_MAX_RAM_SLOTS (32), we error out like this: qemu-system-ppc64: unsupported amount of memory slots: 64 Let the user know about the max allowed slots like this: qemu-system-ppc64: Specified number of memory slots 64 exceeds max supported 32 Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 1170028..5c81e19 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1774,8 +1774,8 @@ static void ppc_spapr_init(MachineState *machine) ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size; if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) { - error_report("unsupported amount of memory slots: %"PRIu64, - machine->ram_slots); + error_report("Specified number of memory slots %"PRIu64" exceeds max supported %d\n", + machine->ram_slots, SPAPR_MAX_RAM_SLOTS); exit(EXIT_FAILURE); }