From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v7 2/3] x86, apicv: add virtual interrupt delivery support Date: Wed, 19 Dec 2012 23:26:30 -0200 Message-ID: <20121220012630.GA29185@amt.cnet> References: <1355722250-7122-1-git-send-email-yang.z.zhang@intel.com> <1355722250-7122-3-git-send-email-yang.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, gleb@redhat.com, haitao.shan@intel.com, Kevin Tian To: Yang Zhang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25559 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190Ab2LTB2p (ORCPT ); Wed, 19 Dec 2012 20:28:45 -0500 Content-Disposition: inline In-Reply-To: <1355722250-7122-3-git-send-email-yang.z.zhang@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: > From: Yang Zhang > > Virtual interrupt delivery avoids KVM to inject vAPIC interrupts > manually, which is fully taken care of by the hardware. This needs > some special awareness into existing interrupr injection path: > > - for pending interrupt, instead of direct injection, we may need > update architecture specific indicators before resuming to guest. > > - A pending interrupt, which is masked by ISR, should be also > considered in above update action, since hardware will decide > when to inject it at right time. Current has_interrupt and > get_interrupt only returns a valid vector from injection p.o.v. > > Signed-off-by: Kevin Tian > Signed-off-by: Yang Zhang > + if (enable_apicv_reg_vid) > + kvm_x86_ops->update_cr8_intercept = NULL; > + else > + kvm_x86_ops->update_apic_irq = NULL; Loading the module with enable_apicv=0, then enable_apicv=1, fails?