aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/timing.c
AgeCommit message (Collapse)AuthorFilesLines
2020-03-04powerpc/kvm: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-13/+4
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because of this cleanup, we get to remove a few fields in struct kvm_arch that are now unused. Signed-off-by: Greg Kroah-Hartman <[email protected]> [mpe: Fix build error in kvm/timing.c, adapt kvmppc_remove_cpu_debugfs()] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation 51 franklin street fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 67 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-11KVM: PPC: Use seq_puts() in kvmppc_exit_timing_show()Markus Elfring1-2/+1
A headline should be quickly put into a sequence. Thus use the function "seq_puts" instead of "seq_printf" for this purpose. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2014-07-28KVM: PPC: Remove DCR handlingAlexander Graf1-1/+0
DCR handling was only needed for 440 KVM. Since we removed it, we can also remove handling of DCR accesses. Signed-off-by: Alexander Graf <[email protected]>
2011-07-12KVM: PPC: fix partial application of "exit timing in ticks"Stuart Yoder1-9/+0
When http://www.spinics.net/lists/kvm-ppc/msg02664.html was applied to produce commit b51e7aa7ed6d8d134d02df78300ab0f91cfff4d2, the removal of the conversion in add_exit_timing was left out. Signed-off-by: Stuart Yoder <[email protected]> Signed-off-by: Scott Wood <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
2011-05-22KVM: PPC: use ticks, not usecs, for exit timingStuart Yoder1-4/+17
Convert to microseconds when displaying (with fix from Bharat Bhushan <[email protected]>). This reduces rounding error with large quantities of short exits. Signed-off-by: Stuart Yoder <[email protected]> Signed-off-by: Scott Wood <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
2011-05-11KVM: PPC: Fix issue clearing exit timing countersBharat Bhushan1-3/+7
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 <[email protected]> Acked-by: Alexander Graf <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2010-11-05KVM: PPC: BookE: fix sleep with interrupts disabledScott Wood1-2/+0
It is not legal to call mutex_lock() with interrupts disabled. This will assert with debug checks enabled. If there's a real need to disable interrupts here, it could be done after the mutex is acquired -- but I don't see why it's needed at all. Signed-off-by: Scott Wood <[email protected]> Reviewed-by: Christian Ehrhardt <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
2010-07-31powerpc: Remove unnecessary casts of private_dataJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2009-11-05powerpc/kvm: Fix non-modular buildBenjamin Herrenschmidt1-0/+1
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2009-10-01const: constify remaining file_operationsAlexey Dobriyan1-1/+1
[[email protected]: fix KVM] Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-12-31KVM: ppc: mostly cosmetic updates to the exit timing accounting codeHollis Blanchard1-66/+43
The only significant changes were to kvmppc_exit_timing_write() and kvmppc_exit_timing_show(), both of which were dramatically simplified. Signed-off-by: Hollis Blanchard <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2008-12-31KVM: ppc: Implement in-kernel exit timing statisticsHollis Blanchard1-0/+262
Existing KVM statistics are either just counters (kvm_stat) reported for KVM generally or trace based aproaches like kvm_trace. For KVM on powerpc we had the need to track the timings of the different exit types. While this could be achieved parsing data created with a kvm_trace extension this adds too much overhead (at least on embedded PowerPC) slowing down the workloads we wanted to measure. Therefore this patch adds a in-kernel exit timing statistic to the powerpc kvm code. These statistic is available per vm&vcpu under the kvm debugfs directory. As this statistic is low, but still some overhead it can be enabled via a .config entry and should be off by default. Since this patch touched all powerpc kvm_stat code anyway this code is now merged and simplified together with the exit timing statistic code (still working with exit timing disabled in .config). Signed-off-by: Christian Ehrhardt <[email protected]> Signed-off-by: Hollis Blanchard <[email protected]> Signed-off-by: Avi Kivity <[email protected]>