Subject: Re: [PATCH 1/1] powerpc: Fix to handle slb resize across migration

From: Benjamin Herrenschmidt <[email-masked]>
Date: Wed, 02 Sep 2009 16:21:37 +1000

On Fri, 2009-08-28 at 17:06 -0500, Brian King wrote:
> The SLB can change sizes across a live migration, which was not
> being handled, resulting in possible machine crashes during
> migration if migrating to a machine which has a smaller max SLB
> size than the source machine. Fix this by first reducing the
> SLB size to the minimum possible value, which is 32, prior to
> migration. Then during the device tree update which occurs after
> migration, we make the call to ensure the SLB gets updated. Also
> add the slb_size to the lparcfg output so that the migration
> tools can check to make sure the kernel has this capability
> before allowing migration in scenarios where the SLB size will change.

The patch causes a build error on 32-bit hash in rtas.c due to this:

> diff -puN arch/powerpc/kernel/rtas.c~powerpc_slb_resize arch/powerpc/kernel/rtas.c
> --- linux-2.6/arch/powerpc/kernel/rtas.c~powerpc_slb_resize	2009-08-21 16:14:41.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/rtas.c	2009-08-21 16:14:41.000000000 -0500
> @@ -39,6 +39,7 @@
>  #include <asm/smp.h>
>  #include <asm/atomic.h>
>  #include <asm/time.h>
> +#include <asm/mmu-hash64.h>

This should just be asm/mmu.h

This is true of all occurences, ie, mmu-hash64.h isn't meant to be
directly included (though it causes no breakage in the other cases)

I'm going to commit a fixed version to powerpc-next today, you may want
to update the version you are sending to distros.

Cheers,
Ben.