From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/5]KVM:x86, apicv: adjust for virtual interrupt delivery Date: Wed, 19 Sep 2012 18:19:14 +0300 Message-ID: <5059E272.3030606@redhat.com> References: <5048CDB9.4040202@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Li, Jiongxi" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34848 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754776Ab2ISPTR (ORCPT ); Wed, 19 Sep 2012 11:19:17 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/17/2012 02:28 PM, Li, Jiongxi wrote: >> > > + } else if (kvm_apic_vid_enabled(vcpu)) { >> > > + if (kvm_cpu_has_interrupt_apic_vid(vcpu) && >> > > + kvm_x86_ops->interrupt_allowed(vcpu)) { >> > > + kvm_queue_interrupt(vcpu, >> > > + kvm_cpu_get_interrupt_apic_vid(vcpu), false); >> > > + kvm_x86_ops->set_irq(vcpu); >> > > + } >> > >> > It may be simpler to change kvm_cpu_{has,get}_interrupt to ignore the >> > apic if virtual interrupt delivery is enabled. >> OKs > > Kvm_cpu_has_interrupt is also called in other place, no just used to judge whether > to inject interrupt manually. For instance, it is called in kvm_arch_vcpu_runnable. > In that case, apic can't be ingored. So for safety, I think it is better to use another > function here other than change the original kvm_cpu_has_interrupt function. Good point. We can call them *_extint(), since that's what they're accepting. -- error compiling committee.c: too many arguments to function