From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v11 3/3] x86, apicv: add virtual interrupt delivery support Date: Mon, 21 Jan 2013 23:18:28 +0200 Message-ID: <20130121211828.GG25818@redhat.com> References: <1358331672-32384-1-git-send-email-yang.z.zhang@intel.com> <1358331672-32384-4-git-send-email-yang.z.zhang@intel.com> <20130121210543.GA7110@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Yang Zhang , kvm@vger.kernel.org, haitao.shan@intel.com, xiantao.zhang@intel.com, Kevin Tian To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3582 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718Ab3AUVSa (ORCPT ); Mon, 21 Jan 2013 16:18:30 -0500 Content-Disposition: inline In-Reply-To: <20130121210543.GA7110@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jan 21, 2013 at 07:05:43PM -0200, Marcelo Tosatti wrote: > > + struct vcpu_vmx *vmx = to_vmx(vcpu); > > + > > + if (WARN_ONCE((vector > 255), > > + "KVM VMX: vector (%d) out of range\n", vector)) > > + return; > > Please remove the WARN_ON, inject triple fault if this happens > (and add a tracepoint). > Since this cannot be triggered by a guest triple fault is unwarranted. Vector can be greater than 255 here only due to KVM bug, so WARN() or even BUG() is appropriate. -- Gleb.