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

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

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 (file)
index 0000000..9637b75
--- /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
+@@ -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;
+       }
index 9778a987cba5f1443fb730eceeaeb7172ddc98a3..4e1d15980a41c4561dcb23e796b325de7220608e 100644 (file)
@@ -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