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

Re: [Xen-devel] [PATCH 4/8] kexec: add infrastructure for handling kexec images



>>> On 09.04.13 at 18:17, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
> On 09/04/13 08:44, Jan Beulich wrote:
>>>>> On 08.04.13 at 20:59, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
>>> +        ret = kimage_add_page(image, page_to_mfn(page) << PAGE_SHIFT);
>> 
>> Constructs like this aren't portable. You ought to use
>> page_to_maddr(), and have the called function have paddr_t
>> instead of unsigned long as the respective parameter.
> 
> I will make this change but it isn't clear to me why this isn't portable.

Because left shifting an unsigned long may shift out significant bits,
namely on 32-bit architectures (and the code here is - iirc - living
under xen/common/).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.