summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-09-12 11:26:22 +0200
committerAvi Kivity <avi@redhat.com>2011-09-25 19:52:43 +0300
commitbd80158aff71a80292f96d9baea1a65bc0ce87b3 (patch)
tree7e5dc6ed6cb0be43d2c6ce20c4771965ce803d51 /include/linux/kvm_host.h
parent7712de872c8ec00a657b867ab0296913f69addac (diff)
downloadop-kernel-dev-bd80158aff71a80292f96d9baea1a65bc0ce87b3.zip
op-kernel-dev-bd80158aff71a80292f96d9baea1a65bc0ce87b3.tar.gz
KVM: Clean up and extend rate-limited output
The use of printk_ratelimit is discouraged, replace it with pr*_ratelimited or __ratelimit. While at it, convert remaining guest-triggerable printks to rate-limited variants. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index d0e42f3..2a414f6 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -18,6 +18,7 @@
#include <linux/msi.h>
#include <linux/slab.h>
#include <linux/rcupdate.h>
+#include <linux/ratelimit.h>
#include <asm/signal.h>
#include <linux/kvm.h>
@@ -282,11 +283,8 @@ struct kvm {
/* The guest did something we don't support. */
#define pr_unimpl(vcpu, fmt, ...) \
- do { \
- if (printk_ratelimit()) \
- printk(KERN_ERR "kvm: %i: cpu%i " fmt, \
- current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \
- } while (0)
+ pr_err_ratelimited("kvm: %i: cpu%i " fmt, \
+ current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__)
#define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt)
#define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt)
OpenPOWER on IntegriCloud