qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter i


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys
Date: Mon, 12 Mar 2012 17:12:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 10.03.2012 16:27, schrieb Peter Maydell:
> On 10 March 2012 14:08, Andreas Färber <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]