This warning can be triggered easily by userspace, so it should certainly not
cause a panic if panic_on_warn is set.

Suggested-by: Alexander Potapenko <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 83aefd759846..31cdb0b8d418 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1557,7 +1557,7 @@ static int set_tsc_khz(struct kvm_vcpu *vcpu, u32 
user_tsc_khz, bool scale)
                        vcpu->arch.tsc_always_catchup = 1;
                        return 0;
                } else {
-                       WARN(1, "user requested TSC rate below hardware 
speed\n");
+                       pr_warn_ratelimited(1, "user requested TSC rate below 
hardware speed\n");
                        return -1;
                }
        }
-- 
1.8.3.1

Reply via email to