Re: [Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-16 Thread Hu Tao
On Sun, Jun 15, 2014 at 12:58:47PM +0300, Michael S. Tsirkin wrote: On Sat, Jun 14, 2014 at 07:07:39PM +0200, Paolo Bonzini wrote: Il 14/06/2014 06:48, Hu Tao ha scritto: return -1 instead. Now user can add objects memory-backend-ram on-the-fly, fail it if cannot allocate memory rather

Re: [Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-16 Thread Paolo Bonzini
Il 16/06/2014 11:54, Hu Tao ha scritto: This needs an audit of all callers or, alternatively, we need to add memory_region_init_ram_nofail. Better leave it for after the merge. Paolo, IIUC you suggested we fix it after merge. Yes. Specifically memory_region_init_ram_from_file does not

Re: [Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-15 Thread Michael S. Tsirkin
On Sat, Jun 14, 2014 at 07:07:39PM +0200, Paolo Bonzini wrote: Il 14/06/2014 06:48, Hu Tao ha scritto: return -1 instead. Now user can add objects memory-backend-ram on-the-fly, fail it if cannot allocate memory rather than quit qemu. Signed-off-by: Hu Tao hu...@cn.fujitsu.com This

Re: [Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-14 Thread Paolo Bonzini
Il 14/06/2014 06:48, Hu Tao ha scritto: return -1 instead. Now user can add objects memory-backend-ram on-the-fly, fail it if cannot allocate memory rather than quit qemu. Signed-off-by: Hu Tao hu...@cn.fujitsu.com This needs an audit of all callers or, alternatively, we need to add

[Qemu-devel] [PATCH RFC 3/4] exec: don't exit unconditionally if failed to allocate memory

2014-06-13 Thread Hu Tao
return -1 instead. Now user can add objects memory-backend-ram on-the-fly, fail it if cannot allocate memory rather than quit qemu. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/hostmem-ram.c | 3 +++ exec.c | 6 +- 2 files changed, 8 insertions(+), 1 deletion(-)