From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment Date: Mon, 04 May 2009 11:25:55 +0300 Message-ID: <49FEA693.8020303@redhat.com> References: <1241060322-25807-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52954 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbZEDI0a (ORCPT ); Mon, 4 May 2009 04:26:30 -0400 In-Reply-To: <1241060322-25807-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > Disable interrupt at interrupt handler and enable it when guest ack is for > the level triggered interrupt, to prevent reinjected interrupt. MSI/MSI-X don't > need it. > > One possible problem is multiply same vector interrupt injected between irq > handler and scheduled work handler would be merged as one for MSI/MSI-X. > But AFAIK, the drivers handle it well. > > The patch fixed the oplin card performance issue(MSI-X performance is half of > MSI/INTx). > > > schedule_work(&assigned_dev->interrupt_work); > > - disable_irq_nosync(irq); > - assigned_dev->host_irq_disabled = true; > + if (assigned_dev->irq_requested_type & KVM_DEV_IRQ_GUEST_INTX) { > + disable_irq_nosync(irq); > + assigned_dev->host_irq_disabled = true; > + } > > out: > spin_unlock_irqrestore(&assigned_dev->assigned_dev_lock, flags); > I don't have the spin_lock_irqrestore() here. The patch applies, but with fuzz. Am I missing a patch? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.