From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment Date: Mon, 4 May 2009 16:37:59 +0800 Message-ID: <200905041638.00430.sheng@linux.intel.com> References: <1241060322-25807-1-git-send-email-sheng@linux.intel.com> <200905041630.34979.sheng@linux.intel.com> <49FEA878.9050204@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mga10.intel.com ([192.55.52.92]:26988 "EHLO fmsmga102.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752012AbZEDIhk (ORCPT ); Mon, 4 May 2009 04:37:40 -0400 In-Reply-To: <49FEA878.9050204@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Monday 04 May 2009 16:34:00 Avi Kivity wrote: > Sheng Yang wrote: > > On Monday 04 May 2009 16:25:55 Avi Kivity wrote: > >> 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? > > > > Oh, it's Marcelo's patchset... > > > > [patch 0/4] use smp_send_reschedule in vcpu_kick / assigned dev host intx > > race fix > > Okay, I am working my queue in reverse order :) > > But please note dependencies on other patches for me. Yes, sorry for totally forgot (mine based on his patchset)... :( -- regards Yang, Sheng