From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS Date: Thu, 1 Oct 2015 14:31:11 +0200 Message-ID: <560D278F.10801@redhat.com> References: <560D1C6E.2060803@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: =?UTF-8?Q?Dirk_M=c3=bcller?= , Joerg Roedel To: kvm@vger.kernel.org, Bandan Das Return-path: Received: from mail-wi0-f175.google.com ([209.85.212.175]:38408 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932255AbbJAMbO (ORCPT ); Thu, 1 Oct 2015 08:31:14 -0400 Received: by wiclk2 with SMTP id lk2so26090107wic.1 for ; Thu, 01 Oct 2015 05:31:13 -0700 (PDT) In-Reply-To: <560D1C6E.2060803@suse.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/10/2015 13:43, Dirk M=C3=BCller wrote: > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 94b7d15..0a42859 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -514,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_= vcpu *vcpu) > struct vcpu_svm *svm =3D to_svm(vcpu); > =20 > if (svm->vmcb->control.next_rip !=3D 0) { > - WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS)); > + WARN_ON_ONCE(!static_cpu_has(X86_FEATURE_NRIPS)); > svm->next_rip =3D svm->vmcb->control.next_rip; > } > =20 Bandan, what was the reason for warning here? Should we change the "if" condition to static_cpu_has(X86_FEATURE_NRIPS= ) instead of Dirk's patch? Paolo