From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Peter Lieven <pl@kamp.de>
Subject: [Qemu-devel] [PATCH] exec: file_ram_alloc report mem prealloc errors
Date: Thu, 14 Aug 2014 14:33:45 +0200 [thread overview]
Message-ID: <1408019625-10799-1-git-send-email-pl@kamp.de> (raw)
if an error occurs initializing hugetables and mem prealloc is enabled
qemu exits silently without dumping the error.
Signed-off-by: Peter Lieven <pl@kamp.de>
---
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;
--
1.7.9.5
reply other threads:[~2014-08-14 12:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408019625-10799-1-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).