• Alexander Graf's avatar
    KVM: PPC: RTAS: Do byte swaps explicitly · 19a44ecf
    Alexander Graf authored
    In commit b59d9d26 we introduced implicit byte swaps for RTAS calls.
    Unfortunately we messed up and didn't swizzle return values properly.
    
    Also the old approach wasn't "sparse" compatible - we were randomly
    reading __be32 values on an LE system.
    
    Let's just do all of the swizzling explicitly with byte swaps right
    where values get used. That way we can at least catch bugs using sparse.
    
    This patch fixes XICS RTAS emulation on little endian hosts for me.
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    19a44ecf
book3s_rtas.c 5.75 KB