Am 10.03.2012 16:27, schrieb Peter Maydell: > On 10 March 2012 14:08, Andreas Färber <afaer...@suse.de> wrote: >> Am 10.03.2012 14:51, schrieb Peter Maydell: >>> "Length of a block of memory on the guest" is what I meant. >>> What you need is "an integer type large enough to hold the >>> difference between two guest pointer values". The size of >>> that type should depend only on the guest config, not on the >>> host, so 'unsigned long', 'size_t', 'off_t' etc are all wrong. >> >> Your view is very ARM-centric. > > I don't understand this remark. Nothing about the above explanation > is ARM-centric [snip]
ARM-centric is that you and Mark are trying to solve the issue of ARM boards supplying guest RAM size as limit for image loading. I'm saying many other boards don't have that issue because they're using a constant size value way below any theoretical limit. Now the theory behind this part of the thread is about what type to use for a delta vs. absolute value. If you subtract void * from void * you get a ptrdiff_t. Similarly in C# or Java or whatever subtracing two Time objects will return a TimeDiff object or so. Whether you specify a temperature in degrees Celsius or Kelvin, the difference is in degrees. In that same spirit I'm opposed to using target_phys_addr_t for a size (delta) between two addresses. HTE. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg