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 seem to
> handle failures.
memory_region_init_ram_from_file has an errp. Also see my updated patch.
Yes, memory_region_init_ram_from_file is okay. memory_region_init_ram
is the one that doesn't handle failures.
> qemu_ram_free chunk also looks weird. Can we not avoid calling
> free on invalid addresses?
but we still need to check the address somewhere if not in
qemu_ram_free.
If we add an errp to memory_region_init_ram, the qemu_ram_free hunk
probably will not be necessary anymore.
Paolo