]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2019 10:47:42 +0000 (12:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2019 10:47:42 +0000 (12:47 +0200)
added patches:
kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch

queue-4.4/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch b/queue-4.4/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch
new file mode 100644 (file)
index 0000000..ba3c091
--- /dev/null
@@ -0,0 +1,38 @@
+From 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 Mon Sep 17 00:00:00 2001
+From: Like Xu <like.xu@linux.intel.com>
+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 <like.xu@linux.intel.com>
+
+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 <joe@perches.com>
+Signed-off-by: Like Xu <like.xu@linux.intel.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -124,8 +124,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;
+       }
index 112e89af430d1b60e3f4e3bf36aa3ef9a15d52ba..b94c5aaecad9804b6d20f54a522629aa722a6d5a 100644 (file)
@@ -68,3 +68,4 @@ lib-scatterlist-fix-mapping-iterator-when-sg-offset-is-greater-than-page_size.pa
 alsa-seq-break-too-long-mutex-context-in-the-write-loop.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