On 12 March 2012 16:04, Alexander Graf <ag...@suse.de> wrote: > On 12.03.2012, at 16:53, Markus Armbruster wrote: >> To be honest, the whole debate feels like bikeshedding to me. Yes, >> load_image_targphys()'s argument max_sz is the size of a slice of guest >> memory. It's also the size of a host object, allocated with g_malloc0() >> in rom_add_file(). It's also the size of a disk file. >> >> I'd make it size_t and be done with it. If you absolutely must >> overengineer things, go ahead and create a new type for target sizes. I >> doubt making it wider than size_t will work in practice without a lot of >> hoop jumping, though. > > I agree. Let's end this discussion and use the biggest variable type we > support for addresses: uint64_t. That way we have host independent > predictability, but don't use _addr_t types which Andreas seems to dislike.
Works for me, and follows the precedent of the memory region API, which makes sense. -- PMM