From patchwork Thu Aug 14 12:33:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 379917 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 441801400B5 for ; Thu, 14 Aug 2014 22:34:35 +1000 (EST) Received: from localhost ([::1]:53818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHuEj-0003jN-Du for incoming@patchwork.ozlabs.org; Thu, 14 Aug 2014 08:34:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHuEH-0003I3-RG for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHuEC-0007g3-3I for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:05 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:37653 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHuEB-0007f6-O2 for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:00 -0400 Received: (qmail 4472 invoked by uid 89); 14 Aug 2014 12:33:57 -0000 Received: from [82.141.1.145] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2010/03/19-MF (clamdscan: 0.98.4/19280. hbedv: 8.3.24.6/7.11.167.76. spamassassin: 3.4.0. Clear:RC:1(82.141.1.145):SA:0(-1.2/4.0):. Processed in 1.089908 secs); 14 Aug 2014 12:33:57 -0000 Received: from ns.kamp-intra.net (HELO dns.kamp-intra.net) ([82.141.1.145]) by mx01.kamp.de with SMTP; 14 Aug 2014 12:33:56 -0000 X-GL_Whitelist: yes Received: from lieven-pc.kamp-intra.net (lieven-pc.kamp-intra.net [172.21.12.60]) by dns.kamp-intra.net (Postfix) with ESMTP id 2E9EA20683; Thu, 14 Aug 2014 14:33:46 +0200 (CEST) Received: by lieven-pc.kamp-intra.net (Postfix, from userid 1000) id 23039613A1; Thu, 14 Aug 2014 14:33:46 +0200 (CEST) From: Peter Lieven To: qemu-devel@nongnu.org Date: Thu, 14 Aug 2014 14:33:45 +0200 Message-Id: <1408019625-10799-1-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.7.9.5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:248:0:51::16 Cc: pbonzini@redhat.com, Peter Lieven Subject: [Qemu-devel] [PATCH] exec: file_ram_alloc report mem prealloc errors 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 if an error occurs initializing hugetables and mem prealloc is enabled qemu exits silently without dumping the error. Signed-off-by: Peter Lieven --- exec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exec.c b/exec.c index 765bd94..8123186 100644 --- a/exec.c +++ b/exec.c @@ -34,6 +34,7 @@ #include "qemu/timer.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "qapi/qmp/qerror.h" #include "exec/memory.h" #include "sysemu/dma.h" #include "exec/address-spaces.h" @@ -1095,6 +1096,9 @@ static void *file_ram_alloc(RAMBlock *block, error: if (mem_prealloc) { + if (*errp) { + qerror_report_err(*errp); + } exit(1); } return NULL;