From: Igor Mammedov <imamm...@redhat.com>

QEMU shouldn't exits from file_ram_alloc() if -mem-prealloc option is specified
and "object_add memory-backend-file,..." fails allocation during memory hotplug.

Propagate error to a caller and let it decide what to do with allocation 
failure.
That leaves QEMU alive if it can't create backend during hotplug time and
kills QEMU at startup time if backends or initial memory were misconfigured/
too large.

Signed-off-by: Igor Mammedov <imamm...@redhat.com>
Message-Id: <1445274671-17704-1-git-send-email-imamm...@redhat.com>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 exec.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/exec.c b/exec.c
index 8af2570..7431f2f 100644
--- a/exec.c
+++ b/exec.c
@@ -1282,10 +1282,6 @@ static void *file_ram_alloc(RAMBlock *block,
     return area;
 
 error:
-    if (mem_prealloc) {
-        error_report("%s", error_get_pretty(*errp));
-        exit(1);
-    }
     return NULL;
 }
 #endif
-- 
1.8.3.1



Reply via email to