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

Jan Beulich JBeulich at suse.com
Wed Apr 10 04:36:59 EDT 2013

>>> On 09.04.13 at 18:17, David Vrabel <david.vrabel at citrix.com> wrote:
> On 09/04/13 08:44, Jan Beulich wrote:
>>>>> On 08.04.13 at 20:59, David Vrabel <david.vrabel at citrix.com> 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/).


More information about the kexec mailing list