]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: PPC: Book3S HV: Fix KVM hang with CONFIG_KVM_XICS=n
authorAnton Blanchard <anton@samba.org>
Mon, 24 Mar 2014 23:47:01 +0000 (10:47 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 26 Mar 2014 12:34:56 +0000 (23:34 +1100)
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>
arch/powerpc/kvm/book3s_hv.c

index 3b498d942a22250d7b52ae9972461ff523695b5b..e0a535cdf07b9f94b505b2f89c04fd9609e2e196 100644 (file)
@@ -86,7 +86,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
 
        /* CPU points to the first thread of the core */
        if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) {
-#ifdef CONFIG_KVM_XICS
+#ifdef CONFIG_PPC_ICP_NATIVE
                int real_cpu = cpu + vcpu->arch.ptid;
                if (paca[real_cpu].kvm_hstate.xics_phys)
                        xics_wake_cpu(real_cpu);
@@ -1360,9 +1360,7 @@ static void kvmppc_start_thread(struct kvm_vcpu *vcpu)
        smp_wmb();
 #if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP)
        if (cpu != smp_processor_id()) {
-#ifdef CONFIG_KVM_XICS
                xics_wake_cpu(cpu);
-#endif
                if (vcpu->arch.ptid)
                        ++vc->n_woken;
        }