From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhai, Edwin" Subject: [PATCH] [IOMMU] interrupt remapping fix Date: Fri, 23 Oct 2009 14:01:38 +0800 Message-ID: <4AE146C2.8080406@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080503060905080303060801" 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: Keir Fraser , Xen Developers Cc: "Zhai, Edwin" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080503060905080303060801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fix the error of translation from int remapping table entry(IRTE) to MSI msg. This error may write wrong IRTE back to the VTd hardware, and block physical interrupts. Signed-Off-By: Zhai Edwin -- best rgds, edwin --------------080503060905080303060801 Content-Type: text/plain; name="vtd_intremap_fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vtd_intremap_fix.patch" Index: xen-dev/xen/drivers/passthrough/vtd/intremap.c =================================================================== --- xen-dev.orig/xen/drivers/passthrough/vtd/intremap.c +++ xen-dev/xen/drivers/passthrough/vtd/intremap.c @@ -468,8 +468,12 @@ static int remap_entry_to_msi_msg( MSI_ADDR_DESTMODE_LOGIC) | ((iremap_entry->lo.dlm != dest_LowestPrio) ? MSI_ADDR_REDIRECTION_CPU: - MSI_ADDR_REDIRECTION_LOWPRI) | - iremap_entry->lo.dst >> 8; + MSI_ADDR_REDIRECTION_LOWPRI); + if ( x2apic_enabled ) + msg->dest32 = iremap_entry->lo.dst; + else + msg->address_lo |= + ((iremap_entry->lo.dst >> 8) & 0xff ) << MSI_ADDR_DEST_ID_SHIFT; msg->data = MSI_DATA_TRIGGER_EDGE | --------------080503060905080303060801 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 --------------080503060905080303060801--