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 /arch/x86/kvm/vmx.c | |
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 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 21217b65b129..a0d6bd9ad442 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2762,8 +2762,8 @@ static void enter_lmode(struct kvm_vcpu *vcpu) | |||
2762 | 2762 | ||
2763 | guest_tr_ar = vmcs_read32(GUEST_TR_AR_BYTES); | 2763 | guest_tr_ar = vmcs_read32(GUEST_TR_AR_BYTES); |
2764 | if ((guest_tr_ar & AR_TYPE_MASK) != AR_TYPE_BUSY_64_TSS) { | 2764 | if ((guest_tr_ar & AR_TYPE_MASK) != AR_TYPE_BUSY_64_TSS) { |
2765 | printk(KERN_DEBUG "%s: tss fixup for long mode. \n", | 2765 | pr_debug_ratelimited("%s: tss fixup for long mode. \n", |
2766 | __func__); | 2766 | __func__); |
2767 | vmcs_write32(GUEST_TR_AR_BYTES, | 2767 | vmcs_write32(GUEST_TR_AR_BYTES, |
2768 | (guest_tr_ar & ~AR_TYPE_MASK) | 2768 | (guest_tr_ar & ~AR_TYPE_MASK) |
2769 | | AR_TYPE_BUSY_64_TSS); | 2769 | | AR_TYPE_BUSY_64_TSS); |
@@ -5634,8 +5634,8 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) | |||
5634 | return 0; | 5634 | return 0; |
5635 | 5635 | ||
5636 | if (unlikely(vmx->fail)) { | 5636 | if (unlikely(vmx->fail)) { |
5637 | printk(KERN_INFO "%s failed vm entry %x\n", | 5637 | pr_info_ratelimited("%s failed vm entry %x\n", __func__, |
5638 | __func__, vmcs_read32(VM_INSTRUCTION_ERROR)); | 5638 | vmcs_read32(VM_INSTRUCTION_ERROR)); |
5639 | return 1; | 5639 | return 1; |
5640 | } | 5640 | } |
5641 | 5641 | ||
@@ -6612,9 +6612,8 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) | |||
6612 | if (vmcs12->vm_entry_msr_load_count > 0 || | 6612 | if (vmcs12->vm_entry_msr_load_count > 0 || |
6613 | vmcs12->vm_exit_msr_load_count > 0 || | 6613 | vmcs12->vm_exit_msr_load_count > 0 || |
6614 | vmcs12->vm_exit_msr_store_count > 0) { | 6614 | vmcs12->vm_exit_msr_store_count > 0) { |
6615 | if (printk_ratelimit()) | 6615 | pr_warn_ratelimited("%s: VMCS MSR_{LOAD,STORE} unsupported\n", |
6616 | printk(KERN_WARNING | 6616 | __func__); |
6617 | "%s: VMCS MSR_{LOAD,STORE} unsupported\n", __func__); | ||
6618 | nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD); | 6617 | nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD); |
6619 | return 1; | 6618 | return 1; |
6620 | } | 6619 | } |