Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-25 Thread Eduardo Habkost
On Thu, Jul 21, 2016 at 11:00:46AM -0400, Paolo Bonzini wrote: > > > > On 21/07/2016 10:36, Markus Armbruster wrote: > > > > ... have the obvious error_propagate() + return here. Matter of taste, > > > > between you and the maintainer. Except there is none. Inexcusable for > > > > a file

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-25 Thread Igor Mammedov
On Fri, 22 Jul 2016 18:19:44 +0200 Markus Armbruster wrote: > Igor Mammedov writes: > > > On Thu, 21 Jul 2016 10:36:40 +0200 > > Markus Armbruster wrote: > > > >> Igor Mammedov writes: > [...] > >> > @@

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-22 Thread Markus Armbruster
Igor Mammedov writes: > On Thu, 21 Jul 2016 10:36:40 +0200 > Markus Armbruster wrote: > >> Igor Mammedov writes: [...] >> > @@ -352,15 +352,14 @@ void os_mem_prealloc(int fd, char *area, size_t >> > memory) >> > for (i = 0;

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-21 Thread Paolo Bonzini
> > On 21/07/2016 10:36, Markus Armbruster wrote: > > > ... have the obvious error_propagate() + return here. Matter of taste, > > > between you and the maintainer. Except there is none. Inexcusable for > > > a file created in 2014. Suggest you appoint yourself. > > > > For now I've queued

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-21 Thread Igor Mammedov
On Thu, 21 Jul 2016 10:36:40 +0200 Markus Armbruster wrote: > Igor Mammedov writes: [...] > > @@ -286,8 +291,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, > > Error **errp) > > if (bc->alloc) { > > bc->alloc(backend, _err); >

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-21 Thread Igor Mammedov
On Thu, 21 Jul 2016 11:05:05 +0200 Paolo Bonzini wrote: > On 21/07/2016 10:36, Markus Armbruster wrote: > > ... have the obvious error_propagate() + return here. Matter of taste, > > between you and the maintainer. Except there is none. Inexcusable for > > a file created

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-21 Thread Paolo Bonzini
On 21/07/2016 10:36, Markus Armbruster wrote: > ... have the obvious error_propagate() + return here. Matter of taste, > between you and the maintainer. Except there is none. Inexcusable for > a file created in 2014. Suggest you appoint yourself. For now I've queued the patch, but I suggest

Re: [Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-21 Thread Markus Armbruster
Igor Mammedov writes: > 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

[Qemu-devel] [PATCH for-2.7] fix qemu exit on memory hotplug when allocation fails at prealloc time

2016-07-20 Thread Igor Mammedov
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