diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-09-12 05:26:22 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-09-25 12:52:43 -0400 |
commit | bd80158aff71a80292f96d9baea1a65bc0ce87b3 (patch) | |
tree | 7e5dc6ed6cb0be43d2c6ce20c4771965ce803d51 /include | |
parent | 7712de872c8ec00a657b867ab0296913f69addac (diff) |
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')
-rw-r--r-- | include/linux/kvm_host.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index d0e42f30edf6..2a414f66af28 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/msi.h> | 18 | #include <linux/msi.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/rcupdate.h> | 20 | #include <linux/rcupdate.h> |
21 | #include <linux/ratelimit.h> | ||
21 | #include <asm/signal.h> | 22 | #include <asm/signal.h> |
22 | 23 | ||
23 | #include <linux/kvm.h> | 24 | #include <linux/kvm.h> |
@@ -282,11 +283,8 @@ struct kvm { | |||
282 | 283 | ||
283 | /* The guest did something we don't support. */ | 284 | /* The guest did something we don't support. */ |
284 | #define pr_unimpl(vcpu, fmt, ...) \ | 285 | #define pr_unimpl(vcpu, fmt, ...) \ |
285 | do { \ | 286 | pr_err_ratelimited("kvm: %i: cpu%i " fmt, \ |
286 | if (printk_ratelimit()) \ | 287 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__) |
287 | printk(KERN_ERR "kvm: %i: cpu%i " fmt, \ | ||
288 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \ | ||
289 | } while (0) | ||
290 | 288 | ||
291 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) | 289 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) |
292 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) | 290 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) |