[CRIU] [PATCH] arch/ppc64: Add PowerPC 64 LE support

Christopher Covington cov at codeaurora.org
Thu Apr 30 10:20:16 PDT 2015


Hi Laurent,

Great work.

On 04/29/2015 11:47 AM, Laurent Dufour wrote:

> --- /dev/null
> +++ b/arch/ppc64/include/asm/page.h
> @@ -0,0 +1,23 @@
> +#ifndef __CR_ASM_PAGE_H__
> +#define __CR_ASM_PAGE_H__
> +
> +/*
> + * Default config for Pseries is to use 64K pages.
> + * See kernel file arch/powerpc/configs/pseries_*defconfig
> + */
> +#ifndef PAGE_SHIFT
> +# define PAGE_SHIFT	16
> +#endif
> +
> +#ifndef PAGE_SIZE
> +# define PAGE_SIZE	(1UL << PAGE_SHIFT)
> +#endif
> +
> +#ifndef PAGE_MASK
> +# define PAGE_MASK	(~(PAGE_SIZE - 1))
> +#endif
> +
> +#define PAGE_PFN(addr)	((addr) / PAGE_SIZE)
> +#define page_size()	PAGE_SIZE

If pages other than 64K are possible, I'd recommend using
sysconf(_SC_PAGESIZE) here.

> +/*
> + * Copied for the Linux kernel arch/powerpc/include/asm/processor.h
> + *
> + * NOTE: 32bit task are supported.
> + */
> +#define TASK_SIZE_USER64 (0x0000400000000000UL)
> +#define TASK_SIZE TASK_SIZE_USER64

Are you able to dump 32 bit tasks with a 64 bit CRIU and this single
hard-coded TASK_SIZE?

> --- a/include/image.h
> +++ b/include/image.h
> @@ -11,7 +11,11 @@
>  #include "bfd.h"
>  #include "bug.h"
>  
> +#ifdef _ARCH_PPC64
> +#define PAGE_IMAGE_SIZE	65536
> +#else
>  #define PAGE_IMAGE_SIZE	4096
> +#endif /* _ARCH_PPC64 */
>  #define PAGE_RSS	1
>  #define PAGE_ANON	2

Can we just get rid of this and the check in crtools.c?

Chris

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


More information about the CRIU mailing list