From: Dirk Müller Date: Thu, 1 Oct 2015 11:43:42 +0000 (+0200) Subject: Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS X-Git-Tag: v3.16.35~1192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0436b7e13971c9322aa5f7e3018d51162dd76ae5;p=thirdparty%2Fkernel%2Fstable.git Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS commit d2922422c48df93f3edff7d872ee4f3191fefb08 upstream. The cpu feature flags are not ever going to change, so warning everytime can cause a lot of kernel log spam (in our case more than 10GB/hour). The warning seems to only occur when nested virtualization is enabled, so it's probably triggered by a KVM bug. This is a sensible and safe change anyway, and the KVM bug fix might not be suitable for stable releases anyway. Signed-off-by: Dirk Mueller Signed-off-by: Paolo Bonzini Signed-off-by: Luis Henriques --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 37e85d0a19408..539f233965f16 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -512,7 +512,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) struct vcpu_svm *svm = to_svm(vcpu); if (svm->vmcb->control.next_rip != 0) { - WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS)); + WARN_ON_ONCE(!static_cpu_has(X86_FEATURE_NRIPS)); svm->next_rip = svm->vmcb->control.next_rip; }