WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] [IOMMU] interrupt remapping fix

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [IOMMU] interrupt remapping fix
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Fri, 23 Oct 2009 14:01:38 +0800
Cc: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Thu, 22 Oct 2009 23:04:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080914)
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 <edwin.zhai@xxxxxxxxx>

--
best rgds,
edwin

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 |
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] [IOMMU] interrupt remapping fix, Zhai, Edwin <=