aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2016-07-20 11:54:03 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-08-02 12:03:58 +0200
commit056b68af773b31fa98fe4538f6424c0079b61415 (patch)
tree2915a5d9bb46cde5af57ef14bc348ddedc6721ab /include/qemu/osdep.h
parent0b21757124d200ff86100a3bc7bb5f81521b42c4 (diff)
downloadqemu-056b68af773b31fa98fe4538f6424c0079b61415.zip
qemu-056b68af773b31fa98fe4538f6424c0079b61415.tar.gz
qemu-056b68af773b31fa98fe4538f6424c0079b61415.tar.bz2
fix qemu exit on memory hotplug when allocation fails at prealloc time
When adding hostmem backend at runtime, QEMU might exit with error: "os_mem_prealloc: Insufficient free host memory pages available to allocate guest RAM" It happens due to os_mem_prealloc() not handling errors gracefully. Fix it by passing errp argument so that os_mem_prealloc() could report error to callers and undo performed allocation when os_mem_prealloc() fails. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1469008443-72059-1-git-send-email-imammedo@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index fbb8759..d7c111d 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -379,7 +379,7 @@ unsigned long qemu_getauxval(unsigned long type);
void qemu_set_tty_echo(int fd, bool echo);
-void os_mem_prealloc(int fd, char *area, size_t sz);
+void os_mem_prealloc(int fd, char *area, size_t sz, Error **errp);
int qemu_read_password(char *buf, int buf_size);