diff options
author | Paul Mackerras <paulus@samba.org> | 2015-03-20 20:39:39 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-03-20 11:42:08 +0100 |
commit | ecb6d6185b3ae40067330eb889977bf2a51f7429 (patch) | |
tree | 6eac4ed0d17496a2d9e0a01c6326591442e16b96 /arch/powerpc | |
parent | 8f902b005ece690f0f50b217975601b804905dc8 (diff) | |
download | linux-ecb6d6185b3ae40067330eb889977bf2a51f7429.tar.bz2 |
KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count
The VPA (virtual processor area) is defined by PAPR and is therefore
big-endian, so we need a be32_to_cpu when reading it in
kvmppc_get_yield_count(). Without this, H_CONFER always fails on a
little-endian host, causing SMP guests to waste time spinning on
spinlocks.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index b2731933f807..de747563d29d 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -636,7 +636,7 @@ static int kvmppc_get_yield_count(struct kvm_vcpu *vcpu) spin_lock(&vcpu->arch.vpa_update_lock); lppaca = (struct lppaca *)vcpu->arch.vpa.pinned_addr; if (lppaca) - yield_count = lppaca->yield_count; + yield_count = be32_to_cpu(lppaca->yield_count); spin_unlock(&vcpu->arch.vpa_update_lock); return yield_count; } |