[PATCH] powerpc/pseries: fix endian problems with LE migration

Michael Ellerman mpe at ellerman.id.au
Wed Jan 21 14:33:46 AEDT 2015


On Wed, 2015-01-21 at 13:32 +1100, Cyril Bur wrote:
> The need to handle ibm,suspend_me specially from within ppc_rtas has left an
> endian bug exposed as rtas_ibm_suspend_me actually performs HCALLs and should
> have its params in CPU endian.

That needs a much better explanation.

Key points:
 - ppc_rtas() is a syscall, which takes arguments in BE
 - ibm,suspend-me is not a real RTAS call and is handled specially in there
 - ibm,suspend-me is actually implemented by an hcall
 - there is currently a bug on LE, because rtas_ibm_suspend_me() takes the
   ppc_rtas() args and feeds them directly to the hcall

> Have ppc_rtas send the params correctly and also interpret the result
> correctly.

That's a second bug which you should also mention above.

> Removed the convoluted use of the rtas_args struct to pass params to
> rtas_ibm_suspend_me in favour of passing what it needs directly.
> 
> Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
> ---
> This patch has been tested with KVM both LE and BE and on PowerVM both LE and
> BE. Under QEMU/KVM the migration happens without touching the these code
> pathes.
> For PowerVM there is no obvious regression on BE and the LE code path now
> provides the correct parameters to the hypervisor

Fold that into the changelog, it's worth remembering.

cheers




More information about the Linuxppc-dev mailing list