From: Keir Fraser Subject: Re: [PATCH] VT-d: split .ack and .disable DMA-MSI actors Date: Fri, 07 Sep 2012 16:05:29 +0100 Message-ID: References: <504A08930200007800099C9A@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <504A08930200007800099C9A@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: xiantao.zhang@intel.com List-Id: xen-devel@lists.xenproject.org On 07/09/2012 13:45, "Jan Beulich" wrote: > Calling irq_complete_move() from .disable is wrong, breaking S3 resume. > > Comparing with all other .ack actors, it was also missing a call to > move_{native,masked}_irq(). As the actor is masking its interrupt > anyway (albeit it's not immediately obvious why), the latter is the > better choice. > > Signed-off-by: Jan Beulich As far as I understand it Acked-by: Keir Fraser I guess you are looking for an Intel ack as well. -- Keir > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vtd/iommu.c > @@ -1039,8 +1039,6 @@ static void dma_msi_mask(struct irq_desc > unsigned long flags; > struct iommu *iommu = desc->action->dev_id; > > - irq_complete_move(desc); > - > /* mask it */ > spin_lock_irqsave(&iommu->register_lock, flags); > dmar_writel(iommu->reg, DMAR_FECTL_REG, DMA_FECTL_IM); > @@ -1053,6 +1051,13 @@ static unsigned int dma_msi_startup(stru > return 0; > } > > +static void dma_msi_ack(struct irq_desc *desc) > +{ > + irq_complete_move(desc); > + dma_msi_mask(desc); > + move_masked_irq(desc); > +} > + > static void dma_msi_end(struct irq_desc *desc, u8 vector) > { > dma_msi_unmask(desc); > @@ -1114,7 +1119,7 @@ static hw_irq_controller dma_msi_type = > .shutdown = dma_msi_mask, > .enable = dma_msi_unmask, > .disable = dma_msi_mask, > - .ack = dma_msi_mask, > + .ack = dma_msi_ack, > .end = dma_msi_end, > .set_affinity = dma_msi_set_affinity, > }; > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel