From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH] AMD IOMMU: Unmapped interrupt should result io page fault Date: Fri, 8 Apr 2011 14:13:43 +0200 Message-ID: <201104081413.43427.wei.wang2@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_3vvnN0fomrjstCF" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Boundary-00=_3vvnN0fomrjstCF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This could help us to debug interrupt related issues. Thanks, Wei =2D- Advanced Micro Devices GmbH Sitz: Dornach, Gemeinde Aschheim,=20 Landkreis M=FCnchen Registergericht M=FCnchen,=20 HRB Nr. 43632 WEEE-Reg-Nr: DE 12919551 Gesch=E4ftsf=FChrer: Alberto Bozzo, Andrew Bowd --Boundary-00=_3vvnN0fomrjstCF Content-Type: text/x-diff; charset="iso-8859-1"; name="unmapped_intr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="unmapped_intr.patch" Content-Description: unmapped_intr.patch # HG changeset patch # User Wei Wang # Node ID 2bd2f621160b93a9f8cb6e21fd1a984d7ae2f51d # Parent ab2944070ca99790546b34fa04a80103d3e7464f Unmapped interrupt should generate IO page faults. This helps us to debug interrupt issues. Signed-off-by Wei Wang diff -r ab2944070ca9 -r 2bd2f621160b xen/drivers/passthrough/amd/iommu_map.c --- a/xen/drivers/passthrough/amd/iommu_map.c Fri Apr 08 12:35:48 2011 +0200 +++ b/xen/drivers/passthrough/amd/iommu_map.c Fri Apr 08 13:54:28 2011 +0200 @@ -327,8 +327,9 @@ void amd_iommu_set_intremap_table(u32 *d set_field_in_reg_u32(0xB, entry, IOMMU_DEV_TABLE_INT_TABLE_LENGTH_MASK, IOMMU_DEV_TABLE_INT_TABLE_LENGTH_SHIFT, &entry); - /* ignore unmapped interrupts */ - set_field_in_reg_u32(IOMMU_CONTROL_ENABLED, entry, + + /* unmapped interrupt results io page faults*/ + set_field_in_reg_u32(IOMMU_CONTROL_DISABLED, entry, IOMMU_DEV_TABLE_INT_TABLE_IGN_UNMAPPED_MASK, IOMMU_DEV_TABLE_INT_TABLE_IGN_UNMAPPED_SHIFT, &entry); set_field_in_reg_u32(int_valid ? IOMMU_CONTROL_ENABLED : --Boundary-00=_3vvnN0fomrjstCF Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_3vvnN0fomrjstCF--