From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suravee Suthikulpanit Subject: Re: [PATCH 0/4] x86/IOMMU: multi-vector MSI prerequisites Date: Wed, 10 Apr 2013 20:51:28 -0500 Message-ID: <51661720.5040702@amd.com> References: <51516FA502000078000C86E1@nat28.tlf.novell.com> <5155242C.1070803@amd.com> <51552A87.5020506@amd.com> <515AB54C02000078000CA021@nat28.tlf.novell.com> <51658B8F02000078000CC203@nat28.tlf.novell.com> <51657976.4080106@amd.com> <5165975002000078000CC256@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5165975002000078000CC256@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: sherry.hurwitz@amd.com, Jacob Shin , xiantao.zhang@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org On 4/10/2013 9:46 AM, Jan Beulich wrote: >>>> On 10.04.13 at 16:38, Suravee Suthikulanit > wrote: >> On 4/10/2013 8:55 AM, Jan Beulich wrote: >>> Suravee, >>> >>> did you have a chance to retry with the v2 patch indicated above, >>> or to gain understanding on the points mentioned above. I'm >>> afraid I won't be able to make any progress (or propose any >>> fixes) without your help here, and we'd really like to have multi- >>> vector MSI support ready for 4.3... >>> >> Sorry I didn't see the patch. Let me try that and get back to you today. > And irrespective of the patch (which fixes another issue, and > I suppose that's not connected to the problem you saw), did > you find an explanation why the IOMMU lookup in the MSI > message read path would fail, when the same lookup in the MSI > message write path obviously succeeds? > > Jan > Jan, - From drivers/passthrough/amd/iommu_init.c: enable_iommu(), the enabling code tries to set MSI affinity for IOMMU. - From xen/arch/x86/msi.c: set_msi_affinity(), the code tries to "read_msi_msg()" which eventually calls "amd_iommu_read_msi_from_ire()". - Please note that the "amd_iommu_read_msi_from_ire()" was originally empty prior the patch. - From the patch, the new code try to call "get_intremap_entry()", which is the function that was asserting due to table is NULL. Here, the MSI read message was sent to read IOMMU registers. Since the message is targeting for IOMMU itself (bdf 0x2 in this case), it should not be remapped. That is why I believe the interrupt remapping table is empty. Let me know what you think. Suravee -