From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/2] AMD IOMMU: handle MSI for phantom functions Date: Mon, 11 Feb 2013 10:53:38 +0000 Message-ID: <1360580018.29432.104.camel@zakaz.uk.xensource.com> References: <511262E302000078000BC738@nat28.tlf.novell.com> <511264DA02000078000BC758@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <511264DA02000078000BC758@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 Cc: Boris Ostrovsky , Sherry Hurwitz , xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2013-02-06 at 13:12 +0000, Jan Beulich wrote: > @@ -379,12 +382,30 @@ void amd_iommu_msi_msg_update_ire( > } > > if ( msi_desc->remap_index >= 0 ) > - update_intremap_entry_from_msi_msg(iommu, bdf, msi_desc, NULL); > + { > + do { > + update_intremap_entry_from_msi_msg(iommu, bdf, > + &msi_desc->remap_index, NULL); > + if ( !pdev || !pdev->phantom_stride ) > + break; > + bdf += pdev->phantom_stride; > + } while ( PCI_SLOT(bdf) == PCI_SLOT(pdev->devfn) ); > + > + msi_desc->remap_index = -1; The reason for this reset is a bit subtle, but I think I get it, might be worth a comment though. Otherwise: Acked-by: Ian Campbell (although with similar caveats to 1/2) Ian.