On 08.11.2013, at 15:36, Cedric Le Goater <clg@xxxxxxxxxx> wrote: > If the host has the same endian order as the guest, there is no need > to byte-swap. > > Signed-off-by: Cédric Le Goater <clg@xxxxxxxxxx> > --- > arch/powerpc/include/asm/kvm_book3s.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h > index ac06434..6974aa0 100644 > --- a/arch/powerpc/include/asm/kvm_book3s.h > +++ b/arch/powerpc/include/asm/kvm_book3s.h > @@ -272,7 +272,7 @@ static inline ulong kvmppc_get_pc(struct kvm_vcpu *vcpu) > > static inline bool kvmppc_need_byteswap(struct kvm_vcpu *vcpu) > { > - return vcpu->arch.shared->msr & MSR_LE; > + return ((vcpu->arch.shared->msr & MSR_LE) != (MSR_KERNEL & MSR_LE)); Ah, I like that one :). However kvmppc_is_bigendian() is still broken now, no? Alex > } > > static inline bool kvmppc_is_bigendian(struct kvm_vcpu *vcpu) > -- > 1.7.10.4 > > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html