alistair23-linux/arch/powerpc/kvm
Bharat Bhushan 09000adb86 KVM: PPC: Fix issue clearing exit timing counters
Following dump is observed on host when clearing the exit timing counters

[root@p1021mds kvm]# echo -n 'c' > vm1200_vcpu0_timing
INFO: task echo:1276 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
echo          D 0ff5bf94     0  1276   1190 0x00000000
Call Trace:
[c2157e40] [c0007908] __switch_to+0x9c/0xc4
[c2157e50] [c040293c] schedule+0x1b4/0x3bc
[c2157e90] [c04032dc] __mutex_lock_slowpath+0x74/0xc0
[c2157ec0] [c00369e4] kvmppc_init_timing_stats+0x20/0xb8
[c2157ed0] [c0036b00] kvmppc_exit_timing_write+0x84/0x98
[c2157ef0] [c00b9f90] vfs_write+0xc0/0x16c
[c2157f10] [c00ba284] sys_write+0x4c/0x90
[c2157f40] [c000e320] ret_from_syscall+0x0/0x3c

        The vcpu->mutex is used by kvm_ioctl_* (KVM_RUN etc) and same was
used when clearing the stats (in kvmppc_init_timing_stats()). What happens
is that when the guest is idle then it held the vcpu->mutx. While the
exiting timing process waits for guest to release the vcpu->mutex and
a hang state is reached.

        Now using seprate lock for exit timing stats.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-05-11 07:57:04 -04:00
..
44x.c KVM: PPC: allow ppc440gp to pass the compatibility check 2010-10-24 10:52:18 +02:00
44x_emulate.c
44x_tlb.c KVM: PPC: fix compilation of "dump tlbs" debug function 2010-10-24 10:52:17 +02:00
44x_tlb.h
book3s.c KVM: PPC: Fix SPRG get/set for Book3S and BookE 2011-03-17 13:08:25 -03:00
book3s_32_mmu.c KVM: PPC: Put segment registers in shared page 2010-10-24 10:52:11 +02:00
book3s_32_mmu_host.c KVM: PPC: Implement correct SID mapping on Book3s_32 2010-10-24 10:52:15 +02:00
book3s_32_sr.S
book3s_64_mmu.c KVM: PPC: Magic Page Book3s support 2010-10-24 10:50:48 +02:00
book3s_64_mmu_host.c KVM: PPC: Implement correct SID mapping on Book3s_32 2010-10-24 10:52:15 +02:00
book3s_64_slb.S
book3s_emulate.c KVM: PPC: Move BAT handling code into spr handler 2010-10-24 10:52:10 +02:00
book3s_exports.c
book3s_interrupts.S
book3s_mmu_hpte.c KVM: PPC: Make invalidation code more reliable 2010-10-24 10:52:06 +02:00
book3s_paired_singles.c Merge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2010-10-24 12:47:25 -07:00
book3s_rmhandlers.S KVM: PPC: Make long relocations be ulong 2010-10-24 10:50:59 +02:00
book3s_segment.S
booke.c KVM: PPC: Fix SPRG get/set for Book3S and BookE 2011-03-17 13:08:25 -03:00
booke.h KVM: PPC: Implement level interrupts for BookE 2010-10-24 10:52:20 +02:00
booke_emulate.c KVM: PPC: Convert SRR0 and SRR1 to shared page 2010-10-24 10:50:45 +02:00
booke_interrupts.S KVM: PPC: BookE: Load the lower half of MSR 2010-11-05 14:42:29 -02:00
e500.c KVM: PPC: e500: Call kvm_vcpu_uninit() before kvmppc_e500_tlb_uninit(). 2010-11-05 14:42:28 -02:00
e500_emulate.c
e500_tlb.c KVM: PPC: Fix compile error in e500_tlb.c 2010-10-24 10:52:22 +02:00
e500_tlb.h KVM: PPC: Convert MSR to shared page 2010-10-24 10:50:43 +02:00
emulate.c Merge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2010-10-24 12:47:25 -07:00
fpu.S powerpc: Remove fpscr use from [kvm_]cvt_{fd,df} 2010-09-02 14:07:32 +10:00
Kconfig
Makefile powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
powerpc.c KVM: PPC: Fix issue clearing exit timing counters 2011-05-11 07:57:04 -04:00
timing.c KVM: PPC: Fix issue clearing exit timing counters 2011-05-11 07:57:04 -04:00
timing.h
trace.h KVM: PPC: Move slb debugging to tracepoints 2010-10-24 10:52:07 +02:00