perf/core for v5.17
Hi Linus,
please pull the perf/core pile for v5.17 which deals with the perf <-> kvm side of things this time around.
Thx.
---
The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:
Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/perf_core_for_v5.17_rc1
for you to fetch changes up to a9f4a6e92b3b319296fb078da2615f618f6cd80c:
perf: Drop guest callback (un)register stubs (2021-11-17 14:49:12 +0100)
----------------------------------------------------------------
Peter Zijlstra says:
"Cleanup of the perf/kvm interaction."
----------------------------------------------------------------
Like Xu (1):
perf/core: Rework guest callbacks to prepare for static_call support
Sean Christopherson (16):
perf: Protect perf_guest_cbs with RCU
KVM: x86: Register perf callbacks after calling vendor's hardware_setup()
KVM: x86: Register Processor Trace interrupt hook iff PT enabled in guest
perf: Stop pretending that perf can handle multiple guest callbacks
perf: Drop dead and useless guest "support" from arm, csky, nds32 and riscv
perf: Add wrappers for invoking guest callbacks
perf: Force architectures to opt-in to guest callbacks perf/core: Use static_call to optimize perf_guest_info_callbacks
KVM: x86: Drop current_vcpu for kvm_running_vcpu + kvm_arch_vcpu variable
KVM: x86: More precisely identify NMI from guest when handling PMI
KVM: Move x86's perf guest info callbacks to generic KVM
KVM: x86: Move Intel Processor Trace interrupt handler to vmx.c
KVM: arm64: Convert to the generic perf callbacks
KVM: arm64: Hide kvm_arm_pmu_available behind CONFIG_HW_PERF_EVENTS=y
KVM: arm64: Drop perf.c and fold its tiny bits of code into arm.c
perf: Drop guest callback (un)register stubs
arch/arm/kernel/perf_callchain.c | 28 +++--------------- arch/arm64/include/asm/kvm_host.h | 11 +++++-- arch/arm64/kernel/image-vars.h | 2 ++ arch/arm64/kernel/perf_callchain.c | 13 +++++---- arch/arm64/kvm/Kconfig | 1 + arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/arm.c | 10 +++++-- arch/arm64/kvm/perf.c | 59 -------------------------------------- arch/arm64/kvm/pmu-emul.c | 2 ++ arch/csky/kernel/perf_callchain.c | 10 ------- arch/nds32/kernel/perf_event_cpu.c | 29 +++---------------- arch/riscv/kernel/perf_callchain.c | 10 ------- arch/x86/events/core.c | 13 +++++---- arch/x86/events/intel/core.c | 5 +--- arch/x86/include/asm/kvm_host.h | 7 +++-- arch/x86/kvm/Kconfig | 1 + arch/x86/kvm/pmu.c | 2 +- arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/vmx/vmx.c | 25 +++++++++++++++- arch/x86/kvm/x86.c | 58 +++++++------------------------------ arch/x86/kvm/x86.h | 17 ++++++++--- arch/x86/xen/Kconfig | 1 + arch/x86/xen/pmu.c | 32 +++++++++------------ include/kvm/arm_pmu.h | 19 +++++++----- include/linux/kvm_host.h | 10 +++++++ include/linux/perf_event.h | 44 ++++++++++++++++++++-------- init/Kconfig | 4 +++ kernel/events/core.c | 41 ++++++++++++++++++-------- virt/kvm/kvm_main.c | 44 ++++++++++++++++++++++++++++ 29 files changed, 246 insertions(+), 256 deletions(-) delete mode 100644 arch/arm64/kvm/perf.c
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG NürnbergQuoted 1 line · Borislav Petkov
KVM: Move x86's perf guest info callbacks to generic KVM
This commit, e1bfc24577cc, introduces a new warning on arm64 with CONFIG_GUEST_PERF_EVENTS=n.
Quoted 1 line
Quoted 1 line
arch/arm64/kvm/arm.c:499:15: warning: no previous prototype for function 'kvm_arch_vcpu_get_ip' [-Wmissing-prototypes]
unsigned long kvm_arch_vcpu_get_ip(struct kvm_vcpu *vcpu)
I floated a potential fix[*], but we all lost track of it. I assume the easiest solution at this point is to post a proper patch to go on top?
--- arch/arm64/kvm/arm.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/kvm/arm.c +2 -0
@@ -496,10 +496,12 @@ bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)return vcpu_mode_priv (vcpu); } +#ifdef CONFIG_GUEST_PERF_EVENTS unsigned long kvm_arch_vcpu_get_ip (struct kvm_vcpu *vcpu) {return *vcpu_pc (vcpu); } +#endif /* Just ensure a guest exit from a particular CPU */ static void exit_vm_noop (void *info)
--
Quoted 10 lines · Sean Christopherson
Quoted 1 line · Borislav Petkov
KVM: Move x86's perf guest info callbacks to generic KVM
This commit,
e1bfc24577cc, introduces a new warning on arm64 withCONFIG_GUEST_PERF_EVENTS=n.Quoted 1 line
Quoted 1 line
arch/arm64/kvm/arm.c:499:15: warning: no previous prototype for function 'kvm_arch_vcpu_get_ip' [-Wmissing-prototypes]unsigned long
kvm_arch_vcpu_get_ip(struct kvm_vcpu *vcpu)I floated a potential fix[*], but we all lost track of it. I assume the easiest solution at this point is to post a proper patch to go on top?
Right, you could send it as a reply to this thread and Linus could simply pick it up directly, after he merges.Probably the easiest ...
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG NürnbergThe pull request you sent on Tue, 11 Jan 2022 18:28:58 +0100:
The pull request you sent on Tue, 11 Jan 2022 18:28:58 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittags/perf_core_for_v5.17_rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8e5b0adeea19309c8ce0e3c9119061554973efa9
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html