Commit d2922422 authored by Dirk Müller's avatar Dirk Müller Committed by Paolo Bonzini

Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS

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.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarDirk Mueller <dmueller@suse.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 038161de
...@@ -514,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) ...@@ -514,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
struct vcpu_svm *svm = to_svm(vcpu); struct vcpu_svm *svm = to_svm(vcpu);
if (svm->vmcb->control.next_rip != 0) { 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; svm->next_rip = svm->vmcb->control.next_rip;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment