Richard Henderson <r...@twiddle.net> writes: > On 06/13/2013 12:02 AM, Markus Armbruster wrote: >> @@ -945,7 +952,7 @@ static void *file_ram_alloc(RAMBlock *block, >> area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); >> #endif >> if (area == MAP_FAILED) { >> - perror("file_ram_alloc: can't mmap RAM pages"); >> + no_guest_mem(block); >> close(fd); >> return (NULL); >> } > > Dead code after no_guest_mem.
Right you are. Before: if allocation obeying -mem-path fails, we retry without -mem-path. Some failures are silent. After: if mmap() fails, we give up. Functional change not mentioned in commit message. I'll either revert it or document it. I'm not sure falling back to non-mem-path allocation is a good idea in all failure cases. Thanks!