diff options
author | Anton Blanchard <anton@samba.org> | 2014-03-24 19:47:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2014-03-26 08:34:56 -0400 |
commit | 7505258c5fcb0a1cc3c76a47b4cf9506d21d10e6 (patch) | |
tree | 20bf8b252c0f77cf5ed7c0c9f2afedbba98d73c5 | |
parent | 69e9fbb278af8de3059f1d1017b52a32b5f9f0bd (diff) |
KVM: PPC: Book3S HV: Fix KVM hang with CONFIG_KVM_XICS=n
I noticed KVM is broken when KVM in-kernel XICS emulation
(CONFIG_KVM_XICS) is disabled.
The problem was introduced in 48eaef05 (KVM: PPC: Book3S HV: use
xics_wake_cpu only when defined). It used CONFIG_KVM_XICS to wrap
xics_wake_cpu, where CONFIG_PPC_ICP_NATIVE should have been
used.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Scott Wood <scottwood@freescale.com>
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 3b498d942a22..e0a535cdf07b 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -86,7 +86,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu) | |||
86 | 86 | ||
87 | /* CPU points to the first thread of the core */ | 87 | /* CPU points to the first thread of the core */ |
88 | if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { | 88 | if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) { |
89 | #ifdef CONFIG_KVM_XICS | 89 | #ifdef CONFIG_PPC_ICP_NATIVE |
90 | int real_cpu = cpu + vcpu->arch.ptid; | 90 | int real_cpu = cpu + vcpu->arch.ptid; |
91 | if (paca[real_cpu].kvm_hstate.xics_phys) | 91 | if (paca[real_cpu].kvm_hstate.xics_phys) |
92 | xics_wake_cpu(real_cpu); | 92 | xics_wake_cpu(real_cpu); |
@@ -1360,9 +1360,7 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu) | |||
1360 | smp_wmb(); | 1360 | smp_wmb(); |
1361 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) | 1361 | #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP) |
1362 | if (cpu != smp_processor_id()) { | 1362 | if (cpu != smp_processor_id()) { |
1363 | #ifdef CONFIG_KVM_XICS | ||
1364 | xics_wake_cpu(cpu); | 1363 | xics_wake_cpu(cpu); |
1365 | #endif | ||
1366 | if (vcpu->arch.ptid) | 1364 | if (vcpu->arch.ptid) |
1367 | ++vc->n_woken; | 1365 | ++vc->n_woken; |
1368 | } | 1366 | } |