PPC: KVM: Make pv hcall endian agnostic
authorAlexander Graf <agraf@suse.de>
Wed, 11 Jun 2014 10:19:03 +0000 (12:19 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:46 +0000 (13:24 +0200)
commitd13fc32ecf8d810ec9894a35e1cfae81f7d88039
treee9ec5d186357744c14c01b1e932f266cab84b419
parente223bcad6e0952d0e205f42b411e96e42262eded
PPC: KVM: Make pv hcall endian agnostic

There were a few revisions of the Linux kernel that incorrectly swapped
the hcall instructions when they saw ePAPR compliant hypercalls.

We already have fixups for those in place when running with PR KVM, but
HV KVM and systems that don't implement hypercalls at all are still broken
because they fall back to the QEMU implementation of fallback hypercalls.

So let's make the fallback hypercall instruction path endian agnostic. This
only really works well for 64bit guests, but I don't think there are any 32bit
systems left that don't implement real pv hcall support, so we'll never get
into this code path.

Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/kvm.c