From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: reset RVI upon system reset Date: Wed, 05 Nov 2014 11:02:19 +0100 Message-ID: <5459F5AB.1050302@redhat.com> References: <1415156023-1349-1-git-send-email-wei.w.wang@intel.com> <5459C020.20103@intel.com> <286AC319A985734F985F78AFA26841F77F3FCD@shsmsx102.ccr.corp.intel.com> <5459DA93.6060104@intel.com> <286AC319A985734F985F78AFA26841F77F404A@shsmsx102.ccr.corp.intel.com> <5459E794.6020500@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "Zhang, Yang Z" To: "Chen, Tiejun" , "Wang, Wei W" , "kvm@vger.kernel.org" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43110 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302AbaKEKC0 (ORCPT ); Wed, 5 Nov 2014 05:02:26 -0500 In-Reply-To: <5459E794.6020500@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/11/2014 10:02, Chen, Tiejun wrote: >> I think both are ok. >> If we zero max_irr in vmx_set_rvi(), we still need this check: >> if ((is_guest_mode(vcpu) && nested_exit_on_intr(vcpu)) || max_irr == -1) > > No, I don't think we need to add this. You don't, because the code will look like: if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu)) return; if (!is_guest_mode(vcpu)) { vmx_set_rvi(max_irr); return; } if (max_irr == -1) return; and thus vmx_set_rvi() is never reached if is_guest_mode(vcpu) && !nested_exit_on_intr(vcpu). I applied the lapic.c part of Wei's patch, and the vmx.c part of Tiejun's patch. Paolo