From: Greg Kroah-Hartman Date: Tue, 23 Jul 2019 10:47:44 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.2.3~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=399d4b802b6592a5b7c70b68cb4badaadfebf802;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch --- diff --git a/queue-4.14/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch b/queue-4.14/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch new file mode 100644 index 00000000000..9637b750599 --- /dev/null +++ b/queue-4.14/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch @@ -0,0 +1,38 @@ +From 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 Mon Sep 17 00:00:00 2001 +From: Like Xu +Date: Thu, 18 Jul 2019 13:35:14 +0800 +Subject: KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed + +From: Like Xu + +commit 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 upstream. + +If a perf_event creation fails due to any reason of the host perf +subsystem, it has no chance to log the corresponding event for guest +which may cause abnormal sampling data in guest result. In debug mode, +this message helps to understand the state of vPMC and we may not +limit the number of occurrences but not in a spamming style. + +Suggested-by: Joe Perches +Signed-off-by: Like Xu +Cc: stable@vger.kernel.org +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/pmu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/kvm/pmu.c ++++ b/arch/x86/kvm/pmu.c +@@ -131,8 +131,8 @@ static void pmc_reprogram_counter(struct + intr ? kvm_perf_overflow_intr : + kvm_perf_overflow, pmc); + if (IS_ERR(event)) { +- printk_once("kvm_pmu: event creation failed %ld\n", +- PTR_ERR(event)); ++ pr_debug_ratelimited("kvm_pmu: event creation failed %ld for pmc->idx = %d\n", ++ PTR_ERR(event), pmc->idx); + return; + } + diff --git a/queue-4.14/series b/queue-4.14/series index 9778a987cba..4e1d15980a4 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -141,3 +141,4 @@ alsa-seq-break-too-long-mutex-context-in-the-write-loop.patch alsa-hda-realtek-apply-alc891-headset-fixup-to-one-dell-machine.patch media-v4l2-test-type-instead-of-cfg-type-in-v4l2_ctrl_new_custom.patch media-coda-remove-unbalanced-and-unneeded-mutex-unlock.patch +kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch