Peter Xu <pet...@redhat.com> wrote: > On Thu, Mar 23, 2017 at 09:45:33PM +0100, Juan Quintela wrote: >> It was used as a size in all cases except one. > > Considering that: > > - qemu_target_page_bits() is only used in migration codes, in only > several places below > > - migration codes is using TARGET_PAGE_{BITS|SIZE} a lot as well
TARGET_PAGE_* is only defined for target specific files, migration (in general) is not one of them (ram.c on the other hand is). Until we exported that function, there wasn't a way to know the TARGET_PAGE_SIZE in migration.c, for instance. > > How about we just remove this function, and directly use > TARGET_PAGE_{BITS|SIZE}? We can't. This was the reason why we used to have exported the sizes in bytes and in pages. There are files in qemu that are compiled by target, and there are files that are compiled the same for all targets. Later, Juan.